X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ftoolbar%2Fplugin.js;h=891b450142078fadabc1e75b049daaaa1b6000a4;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=029e2dc462729519b8fbcba1de45b5cb2486cd46;hpb=614511639979907ceb0da3614122a4d8eb963ad4;p=ckeditor.git diff --git a/_source/plugins/toolbar/plugin.js b/_source/plugins/toolbar/plugin.js index 029e2dc..891b450 100644 --- a/_source/plugins/toolbar/plugin.js +++ b/_source/plugins/toolbar/plugin.js @@ -1,5 +1,5 @@ /* -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 */ @@ -43,8 +43,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { editor.toolbox.focusCommandExecuted = true; - // Make the first button focus accessible. (#3417) - if ( CKEDITOR.env.ie ) + // Make the first button focus accessible for IE. (#3417) + // Adobe AIR instead need while of delay. + if ( CKEDITOR.env.ie || CKEDITOR.env.air ) setTimeout( function(){ editor.toolbox.focus(); }, 100 ); else editor.toolbox.focus(); @@ -345,6 +346,25 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } }); + editor.on( 'destroy', function() + { + var toolbars, index = 0, i, + items, instance; + toolbars = this.toolbox.toolbars; + for ( ; index < toolbars.length; index++ ) + { + items = toolbars[ index ].items; + for ( i = 0; i < items.length; i++ ) + { + instance = items[ i ]; + if ( instance.clickFn ) CKEDITOR.tools.removeFunction( instance.clickFn ); + if ( instance.keyDownFn ) CKEDITOR.tools.removeFunction( instance.keyDownFn ); + + if ( instance.index ) CKEDITOR.ui.button._.instances[ instance.index ] = null; + } + } + }); + editor.addCommand( 'toolbarFocus', commands.toolbarFocus ); } }); @@ -417,7 +437,7 @@ CKEDITOR.config.toolbar_Basic = * ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], * ['BidiLtr', 'BidiRtl' ], * ['Link','Unlink','Anchor'], - * ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'], + * ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'], * '/', * ['Styles','Format','Font','FontSize'], * ['TextColor','BGColor'], @@ -436,7 +456,7 @@ CKEDITOR.config.toolbar_Full = ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], ['BidiLtr', 'BidiRtl' ], ['Link','Unlink','Anchor'], - ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'], + ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'], '/', ['Styles','Format','Font','FontSize'], ['TextColor','BGColor'],