~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to wiki/htdocs/applets/FCKeditor/editor/_source/classes/fcktoolbarfontscombo.js

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
Import upstream version 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * FCKeditor - The text editor for internet
 
3
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
 
4
 * 
 
5
 * Licensed under the terms of the GNU Lesser General Public License:
 
6
 *              http://www.opensource.org/licenses/lgpl-license.php
 
7
 * 
 
8
 * For further information visit:
 
9
 *              http://www.fckeditor.net/
 
10
 * 
 
11
 * "Support Open Source software. What about a donation today?"
 
12
 * 
 
13
 * File Name: fcktoolbarfontscombo.js
 
14
 *      FCKToolbarPanelButton Class: Handles the Fonts combo selector.
 
15
 * 
 
16
 * File Authors:
 
17
 *              Frederico Caldeira Knabben (fredck@fckeditor.net)
 
18
 */
 
19
 
 
20
var FCKToolbarFontsCombo = function( tooltip, style )
 
21
{
 
22
        this.Command    = FCKCommands.GetCommand( 'FontName' ) ;
 
23
        this.Label              = this.GetLabel() ;
 
24
        this.Tooltip    = tooltip ? tooltip : this.Label ;
 
25
        this.Style              = style ? style : FCK_TOOLBARITEM_ICONTEXT ;
 
26
}
 
27
 
 
28
// Inherit from FCKToolbarSpecialCombo.
 
29
FCKToolbarFontsCombo.prototype = new FCKToolbarSpecialCombo ;
 
30
 
 
31
FCKToolbarFontsCombo.prototype.GetLabel = function()
 
32
{
 
33
        return FCKLang.Font ;
 
34
}
 
35
 
 
36
FCKToolbarFontsCombo.prototype.CreateItems = function( targetSpecialCombo )
 
37
{
 
38
        var aFonts = FCKConfig.FontNames.split(';') ;
 
39
        
 
40
        for ( var i = 0 ; i < aFonts.length ; i++ )
 
41
                this._Combo.AddItem( aFonts[i], '<font face="' + aFonts[i] + '" style="font-size: 12px">' + aFonts[i] + '</font>' ) ;
 
42
}
 
 
b'\\ No newline at end of file'