Ticket #4552: 4552_2.patch
File 4552_2.patch, 3.2 KB (added by , 14 years ago) |
---|
-
_source/core/tools.js
189 189 return ( !!object && object instanceof Array ); 190 190 }, 191 191 192 isEmpty : function ( object ) 193 { 194 for ( var i in object ) { 195 if( object.hasOwnProperty( i ) ) 196 return false; 197 } 198 return true; 199 }, 192 200 /** 193 201 * Transforms a CSS property name to its relative DOM style name. 194 202 * @param {String} cssName The CSS property name. -
_source/plugins/floatpanel/plugin.js
56 56 this.element = element; 57 57 58 58 // Register panels to editor for easy destroying ( #4241 ). 59 editor.panels ? editor.panels.push( element ) : editor.panels = [ element];59 editor.panels ? editor.panels.push( panel ) : editor.panels = [ panel ]; 60 60 61 61 62 62 this._ = … … 329 329 } 330 330 } 331 331 }); 332 333 CKEDITOR.on( 'instanceDestroy', function( evt ) 334 { 335 var editor = evt.data, 336 editorPanels = editor.panels; 337 338 // Panel might be used by other instances, just hide them.(#4552) 339 for( var i = 0 ; editorPanels && i < editorPanels.length ; i++ ) 340 editorPanels[ i ].element.hide(); 341 342 // Destroy all shared panels at last when there's no more instances.(#4241) 343 if( CKEDITOR.tools.isEmpty( CKEDITOR.instances ) ) 344 for( var i in panels ) 345 { 346 debugger; 347 panels[ i ].destroy(); 348 delete panels[ i ]; 349 } 350 } ); 332 351 })(); -
_source/plugins/panel/plugin.js
230 230 block.show(); 231 231 232 232 return block; 233 }, 234 235 destroy : function() 236 { 237 this.element && this.element.remove(); 233 238 } 234 239 }; 235 240 -
_source/themes/default/theme.js
155 155 156 156 destroy : function( editor ) 157 157 { 158 var container = editor.container, 159 panels = editor.panels; 158 var container = editor.container; 160 159 161 160 /* 162 161 * IE BUG: Removing the editor DOM elements while the selection is inside … … 183 182 if ( container ) 184 183 container.remove(); 185 184 186 for( var i = 0 ; panels && i < panels.length ; i++ )187 panels[ i ].remove();188 189 185 if ( editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) 190 186 { 191 187 editor.element.show(); -
_source/core/editor.js
467 467 this.theme.destroy( this ); 468 468 this.fire( 'destroy' ); 469 469 CKEDITOR.remove( this ); 470 CKEDITOR.fire( 'instanceDestroy', this ); 470 471 }, 471 472 472 473 /**