X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fstylescombo%2Fplugin.js;h=b693ada6e4576cc67ba3a855783f2e6daf9f07b1;hb=refs%2Ftags%2Fv3.6.6;hp=74dd0b73094db13cc5468dfbc60b8c1f9d66cd69;hpb=4e90e78dc97789709ee7404359a5517540c27553;p=ckeditor.git diff --git a/_source/plugins/stylescombo/plugin.js b/_source/plugins/stylescombo/plugin.js index 74dd0b7..b693ada 100644 --- a/_source/plugins/stylescombo/plugin.js +++ b/_source/plugins/stylescombo/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -14,7 +14,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var config = editor.config, lang = editor.lang.stylesCombo, styles = {}, - stylesList = []; + stylesList = [], + combo; function loadStylesSet( callback ) { @@ -62,7 +63,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license init : function() { - var combo = this; + combo = this; loadStylesSet( function() { @@ -95,7 +96,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license combo.commit(); - combo.onOpen(); }); }, @@ -181,6 +181,22 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( !counter[ CKEDITOR.STYLE_OBJECT ] ) this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_OBJECT ) ] ); + }, + + // Force a reload of the data + reset: function() + { + if ( combo ) + { + delete combo._.panel; + delete combo._.list; + combo._.committed = 0; + combo._.items = {}; + combo._.state = CKEDITOR.TRISTATE_OFF; + } + styles = {}; + stylesList = []; + loadStylesSet(); } });