Changeset 3119
- Timestamp:
- 03/02/09 19:42:55 (4 years ago)
- Location:
- CKEditor/trunk/_source
- Files:
-
- 5 edited
-
core/command.js (modified) (1 diff)
-
core/dom/domobject.js (modified) (1 diff)
-
core/editor_basic.js (modified) (1 diff)
-
core/event.js (modified) (3 diffs)
-
plugins/dialog/plugin.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/_source/core/command.js
r3109 r3119 49 49 } 50 50 51 CKEDITOR.event.implementOn( CKEDITOR.command.prototype );51 CKEDITOR.event.implementOn( CKEDITOR.command.prototype, true ); -
CKEditor/trunk/_source/core/dom/domobject.js
r3113 r3119 193 193 194 194 // Implement CKEDITOR.event. 195 CKEDITOR.event.implementOn( domObjectProto );195 CKEDITOR.event.implementOn( domObjectProto, true ); 196 196 197 197 })( CKEDITOR.dom.domObject.prototype ); -
CKEditor/trunk/_source/core/editor_basic.js
r2948 r3119 175 175 176 176 // "Inherit" (copy actually) from CKEDITOR.event. 177 CKEDITOR.event.implementOn( CKEDITOR.editor.prototype );177 CKEDITOR.event.implementOn( CKEDITOR.editor.prototype, true ); 178 178 } -
CKEditor/trunk/_source/core/event.js
r3090 r3119 19 19 CKEDITOR.event = function() 20 20 { 21 ( this._ || ( this._ = {} ) ).events = {}; 21 //In case of preserving existed events 22 var preExistedEvents = this._ && this._.events; 23 if( !preExistedEvents ) 24 ( this._ || ( this._ = {} ) ).events = {}; 22 25 }; 23 26 … … 25 28 * Implements the {@link CKEDITOR.event} features in an object. 26 29 * @param {Object} targetObject The object in which implement the features. 30 * @param {Boolean} isTargetPrototype If the target is a prototype of 31 * constructor, the internal 'events' object will not be copied, 32 * which should be composed by the constructor itself. 27 33 * @example 28 34 * var myObject = { message : 'Example' }; … … 34 40 * myObject.fire( 'testEvent' ); 35 41 */ 36 CKEDITOR.event.implementOn = function( targetObject )42 CKEDITOR.event.implementOn = function( targetObject , isTargetPrototype) 37 43 { 38 CKEDITOR.event.call( targetObject ); 44 if( !isTargetPrototype ) 45 CKEDITOR.event.call( targetObject ); 39 46 40 47 for ( var prop in CKEDITOR.event.prototype ) 41 48 { 42 if ( targetObject[ prop ] == undefined ) 43 targetObject[ prop ] = CKEDITOR.event.prototype[ prop ]; 49 (function(){ 50 51 var property = prop; 52 53 if ( targetObject[ property ] == undefined ) 54 targetObject[ property ] = isTargetPrototype? 55 function() 56 { 57 //pre-setup events model 58 if( ! ( this._ && this._.events ) ) 59 CKEDITOR.event.call( this ); 60 61 ( this[ property ] = CKEDITOR.event.prototype[ property ] ) 62 .apply( this, arguments ); 63 } : 64 CKEDITOR.event.prototype[ property ]; 65 })(); 44 66 } 45 67 }; -
CKEditor/trunk/_source/plugins/dialog/plugin.js
r3087 r3119 1000 1000 // "Inherit" (copy actually) from CKEDITOR.event. 1001 1001 CKEDITOR.event.implementOn( CKEDITOR.dialog ); 1002 CKEDITOR.event.implementOn( CKEDITOR.dialog.prototype );1002 CKEDITOR.event.implementOn( CKEDITOR.dialog.prototype, true ); 1003 1003 1004 1004 var defaultDialogDefinition =
Note: See TracChangeset
for help on using the changeset viewer.
