2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
\r
3 * Copyright (C) 2003-2009 Frederico Caldeira Knabben
\r
5 * == BEGIN LICENSE ==
\r
7 * Licensed under the terms of any of the following licenses at your
\r
10 * - GNU General Public License Version 2 or later (the "GPL")
\r
11 * http://www.gnu.org/licenses/gpl.html
\r
13 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
\r
14 * http://www.gnu.org/licenses/lgpl.html
\r
16 * - Mozilla Public License Version 1.1 or later (the "MPL")
\r
17 * http://www.mozilla.org/MPL/MPL-1.1.html
\r
21 * FCKToolbarPanelButton Class: Handles the Fonts combo selector.
\r
24 var FCKToolbarFontSizeCombo = function( tooltip, style )
\r
26 this.CommandName = 'FontSize' ;
\r
27 this.Label = this.GetLabel() ;
\r
28 this.Tooltip = tooltip ? tooltip : this.Label ;
\r
29 this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ;
\r
31 this.DefaultLabel = FCKConfig.DefaultFontSizeLabel || '' ;
\r
33 this.FieldWidth = 70 ;
\r
36 // Inherit from FCKToolbarSpecialCombo.
\r
37 FCKToolbarFontSizeCombo.prototype = new FCKToolbarFontFormatCombo( false ) ;
\r
39 FCKToolbarFontSizeCombo.prototype.GetLabel = function()
\r
41 return FCKLang.FontSize ;
\r
44 FCKToolbarFontSizeCombo.prototype.GetStyles = function()
\r
46 var baseStyle = FCKStyles.GetStyle( '_FCK_Size' ) ;
\r
50 alert( "The FCKConfig.CoreStyles['FontFace'] setting was not found. Please check the fckconfig.js file" ) ;
\r
56 var fonts = FCKConfig.FontSizes.split(';') ;
\r
58 for ( var i = 0 ; i < fonts.length ; i++ )
\r
60 var fontParts = fonts[i].split('/') ;
\r
61 var font = fontParts[0] ;
\r
62 var caption = fontParts[1] || font ;
\r
64 var style = FCKTools.CloneObject( baseStyle ) ;
\r
65 style.SetVariable( 'Size', font ) ;
\r
66 style.Label = caption ;
\r
68 styles[ caption ] = style ;
\r
74 FCKToolbarFontSizeCombo.prototype.RefreshActiveItems = FCKToolbarStyleCombo.prototype.RefreshActiveItems ;
\r
76 FCKToolbarFontSizeCombo.prototype.StyleCombo_OnBeforeClick = FCKToolbarFontsCombo.prototype.StyleCombo_OnBeforeClick ;
\r