1075 |
ddelon |
1 |
/*
|
|
|
2 |
* FCKeditor - The text editor for internet
|
|
|
3 |
* Copyright (C) 2003-2006 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: fcktoolbaritems.js
|
|
|
14 |
* Toolbar items definitions.
|
|
|
15 |
*
|
|
|
16 |
* File Authors:
|
|
|
17 |
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
|
|
18 |
*/
|
|
|
19 |
|
|
|
20 |
var FCKToolbarItems = new Object() ;
|
|
|
21 |
FCKToolbarItems.LoadedItems = new Object() ;
|
|
|
22 |
|
|
|
23 |
FCKToolbarItems.RegisterItem = function( itemName, item )
|
|
|
24 |
{
|
|
|
25 |
this.LoadedItems[ itemName ] = item ;
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
FCKToolbarItems.GetItem = function( itemName )
|
|
|
29 |
{
|
|
|
30 |
var oItem = FCKToolbarItems.LoadedItems[ itemName ] ;
|
|
|
31 |
|
|
|
32 |
if ( oItem )
|
|
|
33 |
return oItem ;
|
|
|
34 |
|
|
|
35 |
switch ( itemName )
|
|
|
36 |
{
|
|
|
37 |
case 'Source' : oItem = new FCKToolbarButton( 'Source' , FCKLang.Source, null, FCK_TOOLBARITEM_ICONTEXT, true, true, 1 ) ; break ;
|
|
|
38 |
case 'DocProps' : oItem = new FCKToolbarButton( 'DocProps' , FCKLang.DocProps, null, null, null, null, 2 ) ; break ;
|
|
|
39 |
case 'Save' : oItem = new FCKToolbarButton( 'Save' , FCKLang.Save, null, null, true, null, 3 ) ; break ;
|
|
|
40 |
case 'NewPage' : oItem = new FCKToolbarButton( 'NewPage' , FCKLang.NewPage, null, null, true, null, 4 ) ; break ;
|
|
|
41 |
case 'Preview' : oItem = new FCKToolbarButton( 'Preview' , FCKLang.Preview, null, null, true, null, 5 ) ; break ;
|
|
|
42 |
case 'Templates' : oItem = new FCKToolbarButton( 'Templates' , FCKLang.Templates, null, null, null, null, 6 ) ; break ;
|
|
|
43 |
case 'About' : oItem = new FCKToolbarButton( 'About' , FCKLang.About, null, null, true, null, 47 ) ; break ;
|
|
|
44 |
|
|
|
45 |
case 'Cut' : oItem = new FCKToolbarButton( 'Cut' , FCKLang.Cut, null, null, false, true, 7 ) ; break ;
|
|
|
46 |
case 'Copy' : oItem = new FCKToolbarButton( 'Copy' , FCKLang.Copy, null, null, false, true, 8 ) ; break ;
|
|
|
47 |
case 'Paste' : oItem = new FCKToolbarButton( 'Paste' , FCKLang.Paste, null, null, false, true, 9 ) ; break ;
|
|
|
48 |
case 'PasteText' : oItem = new FCKToolbarButton( 'PasteText' , FCKLang.PasteText, null, null, false, true, 10 ) ; break ;
|
|
|
49 |
case 'PasteWord' : oItem = new FCKToolbarButton( 'PasteWord' , FCKLang.PasteWord, null, null, false, true, 11 ) ; break ;
|
|
|
50 |
case 'Print' : oItem = new FCKToolbarButton( 'Print' , FCKLang.Print, null, null, false, true, 12 ) ; break ;
|
|
|
51 |
case 'SpellCheck' : oItem = new FCKToolbarButton( 'SpellCheck', FCKLang.SpellCheck, null, null, null, null, 13 ) ; break ;
|
|
|
52 |
case 'Undo' : oItem = new FCKToolbarButton( 'Undo' , FCKLang.Undo, null, null, false, true, 14 ) ; break ;
|
|
|
53 |
case 'Redo' : oItem = new FCKToolbarButton( 'Redo' , FCKLang.Redo, null, null, false, true, 15 ) ; break ;
|
|
|
54 |
case 'SelectAll' : oItem = new FCKToolbarButton( 'SelectAll' , FCKLang.SelectAll, null, null, null, null, 18 ) ; break ;
|
|
|
55 |
case 'RemoveFormat' : oItem = new FCKToolbarButton( 'RemoveFormat', FCKLang.RemoveFormat, null, null, false, true, 19 ) ; break ;
|
|
|
56 |
case 'FitWindow' : oItem = new FCKToolbarButton( 'FitWindow' , FCKLang.FitWindow, null, null, true, true, 66 ) ; break ;
|
|
|
57 |
|
|
|
58 |
case 'Bold' : oItem = new FCKToolbarButton( 'Bold' , FCKLang.Bold, null, null, false, true, 20 ) ; break ;
|
|
|
59 |
case 'Italic' : oItem = new FCKToolbarButton( 'Italic' , FCKLang.Italic, null, null, false, true, 21 ) ; break ;
|
|
|
60 |
case 'Underline' : oItem = new FCKToolbarButton( 'Underline' , FCKLang.Underline, null, null, false, true, 22 ) ; break ;
|
|
|
61 |
case 'StrikeThrough' : oItem = new FCKToolbarButton( 'StrikeThrough' , FCKLang.StrikeThrough, null, null, false, true, 23 ) ; break ;
|
|
|
62 |
case 'Subscript' : oItem = new FCKToolbarButton( 'Subscript' , FCKLang.Subscript, null, null, false, true, 24 ) ; break ;
|
|
|
63 |
case 'Superscript' : oItem = new FCKToolbarButton( 'Superscript' , FCKLang.Superscript, null, null, false, true, 25 ) ; break ;
|
|
|
64 |
|
|
|
65 |
case 'OrderedList' : oItem = new FCKToolbarButton( 'InsertOrderedList' , FCKLang.NumberedListLbl, FCKLang.NumberedList, null, false, true, 26 ) ; break ;
|
|
|
66 |
case 'UnorderedList' : oItem = new FCKToolbarButton( 'InsertUnorderedList' , FCKLang.BulletedListLbl, FCKLang.BulletedList, null, false, true, 27 ) ; break ;
|
|
|
67 |
case 'Outdent' : oItem = new FCKToolbarButton( 'Outdent' , FCKLang.DecreaseIndent, null, null, false, true, 28 ) ; break ;
|
|
|
68 |
case 'Indent' : oItem = new FCKToolbarButton( 'Indent' , FCKLang.IncreaseIndent, null, null, false, true, 29 ) ; break ;
|
|
|
69 |
|
|
|
70 |
case 'Link' : oItem = new FCKToolbarButton( 'Link' , FCKLang.InsertLinkLbl, FCKLang.InsertLink, null, false, true, 34 ) ; break ;
|
|
|
71 |
case 'Unlink' : oItem = new FCKToolbarButton( 'Unlink' , FCKLang.RemoveLink, null, null, false, true, 35 ) ; break ;
|
|
|
72 |
case 'Anchor' : oItem = new FCKToolbarButton( 'Anchor' , FCKLang.Anchor, null, null, null, null, 36 ) ; break ;
|
|
|
73 |
|
|
|
74 |
case 'Image' : oItem = new FCKToolbarButton( 'Image' , FCKLang.InsertImageLbl, FCKLang.InsertImage, null, false, true, 37 ) ; break ;
|
|
|
75 |
case 'Flash' : oItem = new FCKToolbarButton( 'Flash' , FCKLang.InsertFlashLbl, FCKLang.InsertFlash, null, false, true, 38 ) ; break ;
|
|
|
76 |
case 'Table' : oItem = new FCKToolbarButton( 'Table' , FCKLang.InsertTableLbl, FCKLang.InsertTable, null, false, true, 39 ) ; break ;
|
|
|
77 |
case 'SpecialChar' : oItem = new FCKToolbarButton( 'SpecialChar' , FCKLang.InsertSpecialCharLbl, FCKLang.InsertSpecialChar, null, false, true, 42 ) ; break ;
|
|
|
78 |
case 'Smiley' : oItem = new FCKToolbarButton( 'Smiley' , FCKLang.InsertSmileyLbl, FCKLang.InsertSmiley, null, false, true, 41 ) ; break ;
|
|
|
79 |
case 'PageBreak' : oItem = new FCKToolbarButton( 'PageBreak' , FCKLang.PageBreakLbl, FCKLang.PageBreak, null, false, true, 43 ) ; break ;
|
|
|
80 |
case 'UniversalKey' : oItem = new FCKToolbarButton( 'UniversalKey' , FCKLang.UniversalKeyboard , null, null, false, true, 44) ; break ;
|
|
|
81 |
|
|
|
82 |
case 'Rule' : oItem = new FCKToolbarButton( 'InsertHorizontalRule', FCKLang.InsertLineLbl, FCKLang.InsertLine, null, false, true, 40 ) ; break ;
|
|
|
83 |
|
|
|
84 |
case 'JustifyLeft' : oItem = new FCKToolbarButton( 'JustifyLeft' , FCKLang.LeftJustify, null, null, false, true, 30 ) ; break ;
|
|
|
85 |
case 'JustifyCenter' : oItem = new FCKToolbarButton( 'JustifyCenter' , FCKLang.CenterJustify, null, null, false, true, 31 ) ; break ;
|
|
|
86 |
case 'JustifyRight' : oItem = new FCKToolbarButton( 'JustifyRight' , FCKLang.RightJustify, null, null, false, true, 32 ) ; break ;
|
|
|
87 |
case 'JustifyFull' : oItem = new FCKToolbarButton( 'JustifyFull' , FCKLang.BlockJustify, null, null, false, true, 33 ) ; break ;
|
|
|
88 |
|
|
|
89 |
case 'Style' : oItem = new FCKToolbarStyleCombo() ; break ;
|
|
|
90 |
case 'FontName' : oItem = new FCKToolbarFontsCombo() ; break ;
|
|
|
91 |
case 'FontSize' : oItem = new FCKToolbarFontSizeCombo() ; break ;
|
|
|
92 |
case 'FontFormat' : oItem = new FCKToolbarFontFormatCombo() ; break ;
|
|
|
93 |
|
|
|
94 |
case 'TextColor' : oItem = new FCKToolbarPanelButton( 'TextColor', FCKLang.TextColor, null, null, 45 ) ; break ;
|
|
|
95 |
case 'BGColor' : oItem = new FCKToolbarPanelButton( 'BGColor' , FCKLang.BGColor, null, null, 46 ) ; break ;
|
|
|
96 |
|
|
|
97 |
case 'Find' : oItem = new FCKToolbarButton( 'Find' , FCKLang.Find, null, null, null, null, 16 ) ; break ;
|
|
|
98 |
case 'Replace' : oItem = new FCKToolbarButton( 'Replace' , FCKLang.Replace, null, null, null, null, 17 ) ; break ;
|
|
|
99 |
|
|
|
100 |
case 'Form' : oItem = new FCKToolbarButton( 'Form' , FCKLang.Form, null, null, null, null, 48 ) ; break ;
|
|
|
101 |
case 'Checkbox' : oItem = new FCKToolbarButton( 'Checkbox' , FCKLang.Checkbox, null, null, null, null, 49 ) ; break ;
|
|
|
102 |
case 'Radio' : oItem = new FCKToolbarButton( 'Radio' , FCKLang.RadioButton, null, null, null, null, 50 ) ; break ;
|
|
|
103 |
case 'TextField' : oItem = new FCKToolbarButton( 'TextField' , FCKLang.TextField, null, null, null, null, 51 ) ; break ;
|
|
|
104 |
case 'Textarea' : oItem = new FCKToolbarButton( 'Textarea' , FCKLang.Textarea, null, null, null, null, 52 ) ; break ;
|
|
|
105 |
case 'HiddenField' : oItem = new FCKToolbarButton( 'HiddenField' , FCKLang.HiddenField, null, null, null, null, 56 ) ; break ;
|
|
|
106 |
case 'Button' : oItem = new FCKToolbarButton( 'Button' , FCKLang.Button, null, null, null, null, 54 ) ; break ;
|
|
|
107 |
case 'Select' : oItem = new FCKToolbarButton( 'Select' , FCKLang.SelectionField, null, null, null, null, 53 ) ; break ;
|
|
|
108 |
case 'ImageButton' : oItem = new FCKToolbarButton( 'ImageButton' , FCKLang.ImageButton, null, null, null, null, 55 ) ; break ;
|
|
|
109 |
|
|
|
110 |
default:
|
|
|
111 |
alert( FCKLang.UnknownToolbarItem.replace( /%1/g, itemName ) ) ;
|
|
|
112 |
return null ;
|
|
|
113 |
}
|
|
|
114 |
|
|
|
115 |
FCKToolbarItems.LoadedItems[ itemName ] = oItem ;
|
|
|
116 |
|
|
|
117 |
return oItem ;
|
|
|
118 |
}
|