Ticket #2927: 2927.patch

File 2927.patch, 3.0 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/dialog/plugin.js

     
    999999
    10001000        // "Inherit" (copy actually) from CKEDITOR.event.
    10011001        CKEDITOR.event.implementOn( CKEDITOR.dialog );
    1002         CKEDITOR.event.implementOn( CKEDITOR.dialog.prototype );
     1002        CKEDITOR.event.implementOn( CKEDITOR.dialog.prototype, true );
    10031003
    10041004        var defaultDialogDefinition =
    10051005        {
  • _source/core/editor_basic.js

     
    174174        };
    175175
    176176        // "Inherit" (copy actually) from CKEDITOR.event.
    177         CKEDITOR.event.implementOn( CKEDITOR.editor.prototype );
     177        CKEDITOR.event.implementOn( CKEDITOR.editor.prototype, true );
    178178}
  • _source/core/event.js

     
    1818         */
    1919        CKEDITOR.event = function()
    2020        {
    21                 ( this._ || ( this._ = {} ) ).events = {};
     21                //In case of preserving existed events
     22                var preExistedEvents = this._   && this._.events;
     23                if( !preExistedEvents )
     24                        ( this._ || ( this._ = {} ) ).events = {};
    2225        };
    2326
    2427        /**
     
    2427        /**
    2528         * Implements the {@link CKEDITOR.event} features in an object.
    2629         * @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.
    2733         * @example
    2834         * var myObject = { message : 'Example' };
    2935         * <b>CKEDITOR.event.implementOn( myObject }</b>;
     
    3339         *     });
    3440         * myObject.fire( 'testEvent' );
    3541         */
    36         CKEDITOR.event.implementOn = function( targetObject )
     42        CKEDITOR.event.implementOn = function( targetObject , isTargetPrototype)
    3743        {
    38                 CKEDITOR.event.call( targetObject );
     44                if( !isTargetPrototype )
     45                        CKEDITOR.event.call( targetObject );
    3946
    4047                for ( var prop in CKEDITOR.event.prototype )
    4148                {
  • _source/core/command.js

     
    4848        }
    4949}
    5050
    51 CKEDITOR.event.implementOn( CKEDITOR.command.prototype );
     51CKEDITOR.event.implementOn( CKEDITOR.command.prototype, true );
  • _source/core/dom/domobject.js

     
    192191        };
    193192
    194193        // Implement CKEDITOR.event.
    195         CKEDITOR.event.implementOn( domObjectProto );
     194        CKEDITOR.event.implementOn( domObjectProto, true );
    196195
    197196})( CKEDITOR.dom.domObject.prototype );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy