Changeset 2498
- Timestamp:
- 09/29/08 05:07:47 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/branches/prototype/_source/plugins/dialog/plugin.js
r2496 r2498 95 95 if ( definition.onLoad ) 96 96 this.on( 'load', definition.onLoad, this, null, CKEDITOR.tools.getNextNumber() ); 97 if ( definition.onOk ) 98 this.on( 'ok', function( evt ) 99 { 100 if ( definition.onOk.call( this, evt ) === false ) 101 evt.data.hide = false; 102 }, this, null, 0 ); 103 if ( definition.onCancel ) 104 this.on( 'cancel', function( evt ) 105 { 106 if ( definition.onCancel.call( this, evt ) === false ) 107 evt.data.hide = false; 108 }, this, null, 0 ); 97 109 98 110 // Insert the title. … … 283 295 { 284 296 return this._.element; 297 }, 298 299 getChild : function( id ) 300 { 301 return this._.contents[id]; 302 }, 303 304 getValueOf : function( id ) 305 { 306 return this._.contents[id] && this._.contents[id].getValue(); 285 307 } 286 308 }; … … 300 322 onClick : function( evt ) 301 323 { 302 evt.data.dialog.hide(); 324 var ret = evt.data.dialog.fire( 'ok', { hide : true } ).hide; 325 if ( ret !== false ) 326 evt.data.dialog.hide(); 303 327 } 304 328 }, … … 311 335 onClick : function( evt ) 312 336 { 313 evt.data.dialog.hide(); 337 var ret = evt.data.dialog.fire( 'cancel', { hide : true } ).hide; 338 if ( ret !== false ) 339 evt.data.dialog.hide(); 314 340 } 315 341 },
Note: See TracChangeset
for help on using the changeset viewer.
