Ticket #5663: 5663.patch
File 5663.patch, 3.4 KB (added by , 14 years ago) |
---|
-
_source/core/ckeditor.js
69 69 delete CKEDITOR.instances[ editor.name ]; 70 70 }; 71 71 72 /** 73 * Perform global clean up to free as much memory as possible 74 * when there are no instances left 75 */ 76 CKEDITOR.on( 'instanceDestroyed', function () 77 { 78 if ( CKEDITOR.tools.isEmpty( this.instances ) ) 79 CKEDITOR.fire( 'reset' ); 80 }); 81 72 82 // Load the bootstrap script. 73 83 CKEDITOR.loader.load( 'core/_bootstrap' ); // @Packager.RemoveLine 74 84 -
_source/core/dom/domobject.js
143 143 { 144 144 var customData = {}; 145 145 146 CKEDITOR.on( 'reset', function() 147 { 148 customData = {}; 149 }); 150 146 151 /** 147 152 * Determines whether the specified object is equal to the current object. 148 153 * @name CKEDITOR.dom.domObject.prototype.equals -
_source/core/tools.js
1 /*1 /* 2 2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. 3 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 4 */ … … 12 12 { 13 13 var functions = []; 14 14 15 CKEDITOR.on( 'reset', function() 16 { 17 functions = []; 18 }); 19 15 20 /** 16 21 * Utility functions. 17 22 * @namespace -
_source/plugins/button/plugin.js
270 270 { 271 271 this.add( name, CKEDITOR.UI_BUTTON, definition ); 272 272 }; 273 274 CKEDITOR.on( 'reset', function() 275 { 276 CKEDITOR.ui.button._.instances = []; 277 }); -
_source/plugins/wysiwygarea/plugin.js
798 798 window.addEventListener( 'load', arguments.callee, false ); 799 799 else 800 800 { 801 body.setAttribute( 'onpageshow', body.getAttribute( 'onpageshow' ) 802 + ';event.persisted && CKEDITOR.tools.callFunction(' + 803 CKEDITOR.tools.addFunction( function() 804 { 805 var allInstances = CKEDITOR.instances, 806 editor, 807 doc; 808 for ( var i in allInstances ) 809 { 810 editor = allInstances[ i ]; 811 doc = editor.document; 812 if ( doc ) 813 { 814 doc.$.designMode = 'off'; 815 doc.$.designMode = 'on'; 816 } 817 } 818 } ) + ')' ); 801 var currentHandler = body.getAttribute( 'onpageshow' ); 802 body.setAttribute( 'onpageshow', ( currentHandler ? currentHandler + ';' : '') + 803 'event.persisted && (function(){' + 804 'var allInstances = CKEDITOR.instances, editor, doc;' + 805 'for ( var i in allInstances )' + 806 '{' + 807 ' editor = allInstances[ i ];' + 808 ' doc = editor.document;' + 809 ' if ( doc )' + 810 ' {' + 811 ' doc.$.designMode = "off";' + 812 ' doc.$.designMode = "on";' + 813 ' }' + 814 '}' + 815 '})();' ); 819 816 } 820 817 } )(); 821 818