Subversion Repositories Applications.papyrus

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
431 ddelon 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
 * File Name: fcktoolbarfontformatcombo.js
12
 * 	FCKToolbarPanelButton Class: Handles the Fonts combo selector.
13
 *
14
 * File Authors:
15
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
16
 */
17
 
18
var FCKToolbarFontFormatCombo = function()
19
{
20
	this.Command =  FCKCommands.GetCommand( 'FontFormat' ) ;
21
}
22
 
23
// Inherit from FCKToolbarSpecialCombo.
24
FCKToolbarFontFormatCombo.prototype = new FCKToolbarSpecialCombo ;
25
 
26
FCKToolbarFontFormatCombo.prototype.GetLabel = function()
27
{
28
	return FCKLang.FontFormat ;
29
}
30
 
31
FCKToolbarFontFormatCombo.prototype.CreateItems = function( targetSpecialCombo )
32
{
33
	// Get the format names from the language file.
34
	var aNames = FCKLang['FontFormats'].split(';') ;
35
	var oNames = {
36
		p		: aNames[0],
37
		pre		: aNames[1],
38
		address	: aNames[2],
39
		h1		: aNames[3],
40
		h2		: aNames[4],
41
		h3		: aNames[5],
42
		h4		: aNames[6],
43
		h5		: aNames[7],
44
		h6		: aNames[8],
45
		div		: aNames[9]
46
	} ;
47
 
48
	// Get the available formats from the configuration file.
49
	var aTags = FCKConfig.FontFormats.split(';') ;
50
 
51
	for ( var i = 0 ; i < aTags.length ; i++ )
52
	{
53
		if ( aTags[i] == 'div' && FCKBrowserInfo.IsGecko )
54
			continue ;
55
		this._Combo.AddItem( aTags[i], '<' + aTags[i] + '>' + oNames[aTags[i]] + '</' + aTags[i] + '>', oNames[aTags[i]] ) ;
56
	}
57
}