Ticket #3077: 3077_2.patch
File 3077_2.patch, 3.2 KB (added by , 15 years ago) |
---|
-
_source/core/tools.js
387 387 { 388 388 return function() { return func.apply( obj, arguments ); }; 389 389 }, 390 390 391 /** 392 * Class creation based on prototype inheritance, with supports of the 393 * following features: 394 * <ul> 395 * <li> Static fields </li> 396 * <li> Private fields </li> 397 * <li> Public(prototype) fields </li> 398 * <li> Chainable base class constructor </li> 399 * </ul> 400 * 401 * @param {Object} definiton (Optional)The class definiton object. 402 */ 391 403 createClass : function( definition ) 392 404 { 393 var $ = definition.$, 405 definition = definition || {}; 406 var $ = definition.$ || function(){}, 394 407 baseClass = definition.base, 395 408 privates = definition.privates || definition._, 396 409 proto = definition.proto, … … 401 414 var originalConstructor = $; 402 415 $ = function() 403 416 { 404 originalConstructor.apply( this, arguments );405 406 417 // Create (and get) the private namespace. 407 418 var _ = this._ || ( this._ = {} ); 408 419 … … 415 426 _[ privateName ] = 416 427 ( typeof priv == 'function' ) ? CKEDITOR.tools.bind( priv, this ) : priv; 417 428 } 429 430 originalConstructor.apply( this, arguments ); 418 431 }; 419 432 } 420 433 … … 421 434 if ( baseClass ) 422 435 { 423 436 $.prototype = this.prototypedCopy( baseClass.prototype ); 437 $.prototype.constructor = $; 424 438 425 439 $.prototype.base = function() 426 440 { -
_source/plugins/menu/plugin.js
51 51 this.editor = editor; 52 52 this.items = []; 53 53 54 this._ = 55 { 56 level : level || 1 57 }; 54 this._.level = level || 1; 58 55 }, 59 56 60 57 _ : -
_source/plugins/contextmenu/plugin.js
19 19 { 20 20 this.id = 'cke_' + CKEDITOR.tools.getNextNumber(); 21 21 this.editor = editor; 22 this._ = 23 { 24 listeners : [], 25 26 functionId : CKEDITOR.tools.addFunction( function( commandName ) 27 { 28 this._.panel.hide(); 29 editor.focus(); 30 editor.execCommand( commandName ); 31 }, 32 this) 33 } 22 this._.listeners = []; 23 this._.functionId = CKEDITOR.tools.addFunction( function( commandName ) 24 { 25 this._.panel.hide(); 26 editor.focus(); 27 editor.execCommand( commandName ); 28 }, 29 this); 34 30 }, 35 31 36 32 _ : -
_source/plugins/listblock/plugin.js
25 25 26 26 this.multiSelect = !!multiSelect; 27 27 28 this._ = 29 { 30 pendingHtml : [], 31 items : {}, 32 groups : {} 33 }; 28 this._.pendingHtml = []; 29 this._.items = {}; 30 this._.groups = {}; 34 31 }, 35 32 36 33 _ :