X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fthemes%2Fdefault%2Ftheme.js;h=b1e94ba8b1bbc55da452839319c4c174ed213320;hb=4e90e78dc97789709ee7404359a5517540c27553;hp=00219fff35d1c82ca2e3d09e94a2f73bd4d03982;hpb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7;p=ckeditor.git diff --git a/_source/themes/default/theme.js b/_source/themes/default/theme.js index 00219ff..b1e94ba 100644 --- a/_source/themes/default/theme.js +++ b/_source/themes/default/theme.js @@ -1,8 +1,13 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ +/** + * @name CKEDITOR.theme + * @class + */ + CKEDITOR.themes.add( 'default', (function() { function checkSharedSpace( editor, spaceName ) @@ -21,8 +26,10 @@ CKEDITOR.themes.add( 'default', (function() { // Creates an HTML structure that reproduces the editor class hierarchy. var html = - '' + - '' + + '' + + '' + '' + '' + '' + @@ -40,6 +47,10 @@ CKEDITOR.themes.add( 'default', (function() // Get the deeper inner
. container = mainContainer.getChild( [0,0,0,0] ); + // Save a reference to the shared space container. + !editor.sharedSpaces && ( editor.sharedSpaces = {} ); + editor.sharedSpaces[ spaceName ] = container; + // When the editor gets focus, we show the space container, hiding others. editor.on( 'focus', function() { @@ -65,7 +76,7 @@ CKEDITOR.themes.add( 'default', (function() return container; } - return { + return /** @lends CKEDITOR.theme */ { build : function( editor, themePath ) { var name = editor.name, @@ -113,12 +124,11 @@ CKEDITOR.themes.add( 'default', (function() var container = CKEDITOR.dom.element.createFromHtml( [ '
' + 'X' + '
' + - '' + + '' + + '' + '' + - '' + - '' + + '' + + '' + + '' + + '' + + '' + '' + '
' + '
' + @@ -222,24 +248,28 @@ CKEDITOR.themes.add( 'default', (function() close : close, tabs : body.getChild( 2 ), contents : body.getChild( [ 3, 0, 0, 0 ] ), - footer : body.getChild( 4 ) + footer : body.getChild( [ 3, 0, 1, 0 ] ) } }; }, destroy : function( editor ) { - var container = editor.container; - container.clearCustomData(); - editor.element.clearCustomData(); + var container = editor.container, + element = editor.element; if ( container ) + { + container.clearCustomData(); container.remove(); + } - if ( editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) - editor.element.show(); - - delete editor.element; + if ( element ) + { + element.clearCustomData(); + editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE && element.show(); + delete editor.element; + } } }; })() ); @@ -319,7 +349,7 @@ CKEDITOR.editor.prototype.resize = function( width, height, isContentHeight, res */ CKEDITOR.editor.prototype.getResizable = function() { - return this.container.getChild( 1 ); + return this.container; }; /** @@ -351,6 +381,6 @@ CKEDITOR.editor.prototype.getResizable = function() /** * Fired after the editor instance is resized through * the {@link CKEDITOR.editor.prototype.resize} method. - * @name CKEDITOR#resize + * @name CKEDITOR.editor#resize * @event */