Ticket #7280: 7280_4.patch
File 7280_4.patch, 3.9 KB (added by , 13 years ago) |
---|
-
_source/plugins/panelbutton/plugin.js
32 32 33 33 $ : function( definition ) 34 34 { 35 // Store/Restore a copy of the panel definition to allow switch toolbars 36 if ( definition.panel ) 37 definition.storedPanel = definition.panel; 38 else 39 definition.panel = definition.storedPanel; 40 35 41 // We don't want the panel definition in this object. 36 42 var panelDefinition = definition.panel; 37 43 delete definition.panel; -
_source/plugins/richcombo/plugin.js
128 128 clickFn : clickFn 129 129 }; 130 130 131 function updateState()131 instance.updateState = function() 132 132 { 133 133 var state = this.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED; 134 134 this.setState( editor.readOnly && !this.readOnly ? CKEDITOR.TRISTATE_DISABLED : state ); 135 135 this.setValue( '' ); 136 136 } 137 137 138 editor.on( 'mode', updateState, this );138 editor.on( 'mode', instance.updateState, this ); 139 139 // If this combo is sensitive to readOnly state, update it accordingly. 140 !this.readOnly && editor.on( 'readOnly', updateState, this);140 !this.readOnly && editor.on( 'readOnly', instance.updateState, this); 141 141 142 142 var keyDownFn = CKEDITOR.tools.addFunction( function( ev, element ) 143 143 { -
_source/plugins/toolbar/plugin.js
168 168 { 169 169 if ( event.data.space == editor.config.toolbarLocation ) 170 170 { 171 event.data.html += generateToolbarHtml( editor ); 172 } 173 }); 174 175 var generateToolbarHtml = function ( editor ) 176 { 171 177 editor.toolbox = new toolbox(); 172 178 173 179 var labelId = CKEDITOR.tools.getNextId(); … … 376 382 '</a>' ); 377 383 } 378 384 379 event.data.html += output.join( '' ); 380 } 381 }); 385 return output.join( '' ); 386 }; 382 387 383 editor.on( 'destroy',function()388 var destroyToolbar = function() 384 389 { 385 390 var toolbars, index = 0, i, 386 391 items, instance; … … 393 398 instance = items[ i ]; 394 399 if ( instance.clickFn ) CKEDITOR.tools.removeFunction( instance.clickFn ); 395 400 if ( instance.keyDownFn ) CKEDITOR.tools.removeFunction( instance.keyDownFn ); 401 402 if ( instance.button && instance.button.command ) 403 { 404 var command = editor.getCommand( instance.button.command ); 405 command.uiItems = []; 406 } 407 408 if ( instance.updateState ) 409 { 410 this.removeListener( 'mode', instance.updateState ); 411 this.removeListener( 'readOnly', instance.updateState ); 412 } 396 413 } 397 414 } 398 } );415 }; 399 416 417 editor.on( 'destroy', destroyToolbar ); 418 419 // Method to switch the currently used toolbar 420 editor.setToolbar = function( toolbar ) 421 { 422 // Remove existing toolbar 423 destroyToolbar.call( this ); 424 425 // Set new one 426 this.config.toolbar = toolbar; 427 428 // Create it 429 var toolbarLocation = this.config.toolbarLocation, 430 space = document.getElementById( 'cke_' + toolbarLocation + '_' + this.name ); 431 432 space.innerHTML = generateToolbarHtml( this ); 433 434 // IE... 435 if ( CKEDITOR.env.ie ) 436 { 437 var table = space.parentNode.parentNode.parentNode; 438 table.style.display = 'none'; 439 // Force refresh 440 var h = table.scrollHeight; 441 table.style.display = ''; 442 } 443 }; 444 400 445 editor.addCommand( 'toolbarFocus', commands.toolbarFocus ); 401 446 402 447 editor.ui.add( '-', CKEDITOR.UI_SEPARATOR, {} );