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