/*\r
-Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
var config = editor.config,\r
lang = editor.lang.stylesCombo,\r
styles = {},\r
- stylesList = [];\r
+ stylesList = [],\r
+ combo;\r
\r
function loadStylesSet( callback )\r
{\r
\r
init : function()\r
{\r
- var combo = this;\r
+ combo = this;\r
\r
loadStylesSet( function()\r
{\r
\r
combo.commit();\r
\r
- combo.onOpen();\r
});\r
},\r
\r
\r
if ( !counter[ CKEDITOR.STYLE_OBJECT ] )\r
this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_OBJECT ) ] );\r
+ },\r
+\r
+ // Force a reload of the data\r
+ reset: function()\r
+ {\r
+ if ( combo )\r
+ {\r
+ delete combo._.panel;\r
+ delete combo._.list;\r
+ combo._.committed = 0;\r
+ combo._.items = {};\r
+ combo._.state = CKEDITOR.TRISTATE_OFF;\r
+ }\r
+ styles = {};\r
+ stylesList = [];\r
+ loadStylesSet();\r
}\r
});\r
\r