X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ffont%2Fplugin.js;h=70f3d9d698f7fc60a5db0515e2d27e9418899eda;hb=refs%2Ftags%2Fv3.2;hp=88aa38f1a72565272ccbd2224212accc229a673d;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/plugins/font/plugin.js b/_source/plugins/font/plugin.js index 88aa38f..70f3d9d 100644 --- a/_source/plugins/font/plugin.js +++ b/_source/plugins/font/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -17,27 +17,33 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var styles = {}; for ( var i = 0 ; i < names.length ; i++ ) { - var vars = {}; - var parts = names[ i ].split( '/' ); + var parts = names[ i ]; - var name = names[ i ] = parts[ 0 ]; - vars[ styleType ] = values[ i ] = parts[ 1 ] || name; + if ( parts ) + { + parts = parts.split( '/' ); + + var vars = {}, + name = names[ i ] = parts[ 0 ]; - styles[ name ] = new CKEDITOR.style( styleDefinition, vars ); + vars[ styleType ] = values[ i ] = parts[ 1 ] || name; + + styles[ name ] = new CKEDITOR.style( styleDefinition, vars ); + } + else + names.splice( i--, 1 ); } editor.ui.addRichCombo( comboName, { label : lang.label, title : lang.panelTitle, - voiceLabel : lang.voiceLabel, className : 'cke_' + ( styleType == 'size' ? 'fontSize' : 'font' ), - multiSelect : false, - panel : { - css : [ config.contentsCss, CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ], - voiceLabel : lang.panelVoiceLabel + css : editor.skin.editor.css.concat( config.contentsCss ), + multiSelect : false, + attributes : { 'aria-label' : lang.panelTitle } }, init : function()