[ Index ]
 

Code source de FCKeditor 2.4

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/editor/_source/classes/ -> fcktoolbarfontsizecombo.js (source)

   1  /*
   2   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
   3   * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   4   * 
   5   * == BEGIN LICENSE ==
   6   * 
   7   * Licensed under the terms of any of the following licenses at your
   8   * choice:
   9   * 
  10   *  - GNU General Public License Version 2 or later (the "GPL")
  11   *    http://www.gnu.org/licenses/gpl.html
  12   * 
  13   *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  14   *    http://www.gnu.org/licenses/lgpl.html
  15   * 
  16   *  - Mozilla Public License Version 1.1 or later (the "MPL")
  17   *    http://www.mozilla.org/MPL/MPL-1.1.html
  18   * 
  19   * == END LICENSE ==
  20   * 
  21   * File Name: fcktoolbarfontsizecombo.js
  22   *     FCKToolbarPanelButton Class: Handles the Fonts combo selector.
  23   * 
  24   * File Authors:
  25   *         Frederico Caldeira Knabben (www.fckeditor.net)
  26   */
  27  
  28  var FCKToolbarFontSizeCombo = function( tooltip, style )
  29  {
  30      this.CommandName    = 'FontSize' ;
  31      this.Label        = this.GetLabel() ;
  32      this.Tooltip    = tooltip ? tooltip : this.Label ;
  33      this.Style        = style ? style : FCK_TOOLBARITEM_ICONTEXT ;
  34  }
  35  
  36  // Inherit from FCKToolbarSpecialCombo.
  37  FCKToolbarFontSizeCombo.prototype = new FCKToolbarSpecialCombo ;
  38  
  39  
  40  FCKToolbarFontSizeCombo.prototype.GetLabel = function()
  41  {
  42      return FCKLang.FontSize ;
  43  }
  44  
  45  FCKToolbarFontSizeCombo.prototype.CreateItems = function( targetSpecialCombo )
  46  {
  47      targetSpecialCombo.FieldWidth = 70 ;
  48      
  49      var aSizes = FCKConfig.FontSizes.split(';') ;
  50      
  51      for ( var i = 0 ; i < aSizes.length ; i++ )
  52      {
  53          var aSizeParts = aSizes[i].split('/') ;
  54          this._Combo.AddItem( aSizeParts[0], '<font size="' + aSizeParts[0] + '">' + aSizeParts[1] + '</font>', aSizeParts[1] ) ;
  55      }
  56  }


Généré le : Sun Feb 25 15:28:05 2007 par Balluche grâce à PHPXref 0.7