| 42 | | |
| 43 | | |
| | 44 | this.centered = (options && options.centered === true) ? true : false; |
| | 45 | |
| | 46 | /* Check global config to see if we should override any of the above options |
| | 47 | If a global option is set, it will apply to all dialogs, regardless of their |
| | 48 | individual settings (i.e., it will override them). If the global option is |
| | 49 | undefined, the options passed in above will be used. |
| | 50 | */ |
| | 51 | globalOptions = editor.config.dialogOptions |
| | 52 | if (globalOptions) { |
| | 53 | if (typeof(globalOptions.centered) != 'undefined') { |
| | 54 | this.centered = globalOptions.centered; |
| | 55 | } |
| | 56 | if (typeof(globalOptions.resizable) != 'undefined') { |
| | 57 | this.resizable = globalOptions.resizable; |
| | 58 | } |
| | 59 | if (typeof(globalOptions.closable) != 'undefined') { |
| | 60 | this.closable = globalOptions.closable; |
| | 61 | } |
| | 62 | if (typeof(globalOptions.modal) != 'undefined') { |
| | 63 | this.modal = globalOptions.modal; |
| | 64 | } |
| | 65 | } |
| | 66 | |
| 207 | | this.resizer = document.createElement('div'); |
| 208 | | this.resizer.className = "resizeHandle"; |
| 209 | | with (this.resizer.style) |
| 210 | | { |
| 211 | | position = "absolute"; |
| 212 | | bottom = "0px"; |
| 213 | | right= "0px"; |
| 214 | | } |
| 215 | | Xinha._addEvent(this.resizer, 'mousedown', function(ev) { dialog.resizeStart(ev); }); |
| 216 | | rootElem.appendChild(this.resizer); |
| 217 | | |
| | 230 | this.resizer = null; |
| | 231 | if (this.resizable) |
| | 232 | { |
| | 233 | this.resizer = document.createElement('div'); |
| | 234 | this.resizer.className = "resizeHandle"; |
| | 235 | with (this.resizer.style) |
| | 236 | { |
| | 237 | position = "absolute"; |
| | 238 | bottom = "0px"; |
| | 239 | right= "0px"; |
| | 240 | } |
| | 241 | Xinha._addEvent(this.resizer, 'mousedown', function(ev) { dialog.resizeStart(ev); }); |
| | 242 | rootElem.appendChild(this.resizer); |
| | 243 | } |
| | 244 | |