Changeset 1019 for branches/new-dialogs
- Timestamp:
- 08/15/08 19:53:53 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new-dialogs/modules/Dialogs/XinhaDialog.js
r1018 r1019 43 43 this.layer = (options && options.layer) ? options.layer : 0; 44 44 this.centered = (options && options.centered === true) ? true : false; 45 45 this.closeOnEscape = (options && options.closeOnEscape === true) ? true : false; 46 46 47 /* Check global config to see if we should override any of the above options 47 48 If a global option is set, it will apply to all dialogs, regardless of their … … 63 64 this.modal = globalOptions.modal; 64 65 } 65 } 66 if (typeof(globalOptions.closeOnEscape) != 'undefined') { 67 this.closeOnEscape = globalOptions.closeOnEscape; 68 } 69 } 70 71 /* NOTE: Support for modeless dialogs is incomplete and all current plugins 72 /* use modal dialogs, so I'm deactivating modeless dialogs until these issues are fixed 73 /* Outstanding issues with modeless dialogs: 74 /* - it's possible new modeless dialogs will be opened behind other dialogs 75 /* - there's no visual indication as to which modeless dialog is frontmost and has focus 76 /* - closing one dialog does not cause the dialog behind it to gain focus 77 /* - no active modeless dialog is set until one is clicked, i.e., none is set by just calling show() 78 /* - you can type in a form field of a dialog even when it's not frontmost (and doing so doesn't activate it) 79 /* See discussion on ticket #1264: http://xinha.webfactional.com/ticket/1264 80 */ 81 this.modal = true; 66 82 67 83 if (Xinha.is_ie) … … 171 187 } 172 188 rootElem.appendChild(this.buttons); 173 189 190 if (this.closeOnEscape) 191 { 192 Xinha._addEvent(document, 'keypress', function(ev) { 193 if (ev.keyCode == 27) // ESC key 194 { 195 if (Xinha.Dialog.activeModeless == dialog || dialog.modal) 196 { 197 dialog.hide(); 198 return true; 199 } 200 } 201 }); 202 } 203 174 204 this.closer = null; 175 205 if ( this.closable )
Note: See TracChangeset
for help on using the changeset viewer.