source: trunk/admin/inc/FCKeditor/editor/dialog/fck_tablecell.html@ 2

Last change on this file since 2 was 2, checked in by root, 15 years ago

importo il progetto

File size: 8.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
2<!--
3 * FCKeditor - The text editor for internet
4 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
5 *
6 * Licensed under the terms of the GNU Lesser General Public License:
7 * http://www.opensource.org/licenses/lgpl-license.php
8 *
9 * For further information visit:
10 * http://www.fckeditor.net/
11 *
12 * "Support Open Source software. What about a donation today?"
13 *
14 * File Name: fck_tablecell.html
15 * Cell properties dialog window.
16 *
17 * File Authors:
18 * Frederico Caldeira Knabben (fredck@fckeditor.net)
19-->
20<html xmlns="http://www.w3.org/1999/xhtml">
21<head>
22 <title>Table Cell Properties</title>
23 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
24 <meta name="robots" content="noindex, nofollow" />
25 <script src="common/fck_dialog_common.js" type="text/javascript"></script>
26 <script type="text/javascript">
27
28var oEditor = window.parent.InnerDialogLoaded() ;
29
30// Gets the document DOM
31var oDOM = oEditor.FCK.EditorDocument ;
32
33// Array of selected Cells
34var aCells = oEditor.FCKTableHandler.GetSelectedCells() ;
35
36window.onload = function()
37{
38 // First of all, translate the dialog box texts
39 oEditor.FCKLanguageManager.TranslatePage( document ) ;
40
41 SetStartupValue() ;
42
43 window.parent.SetOkButton( true ) ;
44 window.parent.SetAutoSize( true ) ;
45}
46
47function SetStartupValue()
48{
49 if ( aCells.length > 0 )
50 {
51 var oCell = aCells[0] ;
52 var iWidth = GetAttribute( oCell, 'width' ) ;
53
54 if ( iWidth.indexOf && iWidth.indexOf( '%' ) >= 0 )
55 {
56 iWidth = iWidth.substr( 0, iWidth.length - 1 ) ;
57 GetE('selWidthType').value = 'percent' ;
58 }
59
60 if ( oCell.attributes['noWrap'] != null && oCell.attributes['noWrap'].specified )
61 GetE('selWordWrap').value = !oCell.noWrap ;
62
63 GetE('txtWidth').value = iWidth ;
64 GetE('txtHeight').value = GetAttribute( oCell, 'height' ) ;
65 GetE('selHAlign').value = GetAttribute( oCell, 'align' ) ;
66 GetE('selVAlign').value = GetAttribute( oCell, 'vAlign' ) ;
67 GetE('txtRowSpan').value = GetAttribute( oCell, 'rowSpan' ) ;
68 GetE('txtCollSpan').value = GetAttribute( oCell, 'colSpan' ) ;
69 GetE('txtBackColor').value = GetAttribute( oCell, 'bgColor' ) ;
70 GetE('txtBorderColor').value = GetAttribute( oCell, 'borderColor' ) ;
71// GetE('cmbFontStyle').value = oCell.className ;
72 }
73}
74
75// Fired when the user press the OK button
76function Ok()
77{
78 for( i = 0 ; i < aCells.length ; i++ )
79 {
80 if ( GetE('txtWidth').value.length > 0 )
81 aCells[i].width = GetE('txtWidth').value + ( GetE('selWidthType').value == 'percent' ? '%' : '') ;
82 else
83 aCells[i].removeAttribute( 'width', 0 ) ;
84
85 if ( GetE('selWordWrap').value == 'false' )
86 aCells[i].noWrap = true ;
87 else
88 aCells[i].removeAttribute( 'noWrap' ) ;
89
90 SetAttribute( aCells[i], 'height' , GetE('txtHeight').value ) ;
91 SetAttribute( aCells[i], 'align' , GetE('selHAlign').value ) ;
92 SetAttribute( aCells[i], 'vAlign' , GetE('selVAlign').value ) ;
93 SetAttribute( aCells[i], 'rowSpan' , GetE('txtRowSpan').value ) ;
94 SetAttribute( aCells[i], 'colSpan' , GetE('txtCollSpan').value ) ;
95 SetAttribute( aCells[i], 'bgColor' , GetE('txtBackColor').value ) ;
96 SetAttribute( aCells[i], 'borderColor' , GetE('txtBorderColor').value ) ;
97// SetAttribute( aCells[i], 'className' , GetE('cmbFontStyle').value ) ;
98 }
99
100 return true ;
101}
102
103function SelectBackColor( color )
104{
105 if ( color && color.length > 0 )
106 GetE('txtBackColor').value = color ;
107}
108
109function SelectBorderColor( color )
110{
111 if ( color && color.length > 0 )
112 GetE('txtBorderColor').value = color ;
113}
114
115function SelectColor( wich )
116{
117 oEditor.FCKDialog.OpenDialog( 'FCKDialog_Color', oEditor.FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 400, 330, wich == 'Back' ? SelectBackColor : SelectBorderColor, window ) ;
118}
119
120 </script>
121</head>
122<body scroll="no" style="overflow: hidden">
123 <table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
124 <tr>
125 <td>
126 <table cellspacing="1" cellpadding="1" width="100%" border="0">
127 <tr>
128 <td>
129 <table cellspacing="0" cellpadding="0" border="0">
130 <tr>
131 <td nowrap="nowrap">
132 <span fcklang="DlgCellWidth">Width</span>:</td>
133 <td>
134 &nbsp;<input onkeypress="return IsDigit(event);" id="txtWidth" type="text" maxlength="4"
135 size="3" name="txtWidth" />&nbsp;<select id="selWidthType" name="selWidthType">
136 <option fcklang="DlgCellWidthPx" value="pixels" selected="selected">pixels</option>
137 <option fcklang="DlgCellWidthPc" value="percent">percent</option>
138 </select></td>
139 </tr>
140 <tr>
141 <td nowrap="nowrap">
142 <span fcklang="DlgCellHeight">Height</span>:</td>
143 <td>
144 &nbsp;<input id="txtHeight" type="text" maxlength="4" size="3" name="txtHeight" onkeypress="return IsDigit(event);" />&nbsp;<span
145 fcklang="DlgCellWidthPx">pixels</span></td>
146 </tr>
147 <tr>
148 <td>
149 &nbsp;</td>
150 <td>
151 &nbsp;</td>
152 </tr>
153 <tr>
154 <td nowrap="nowrap">
155 <span fcklang="DlgCellWordWrap">Word Wrap</span>:</td>
156 <td>
157 &nbsp;<select id="selWordWrap" name="selAlignment">
158 <option fcklang="DlgCellWordWrapYes" value="true" selected="selected">Yes</option>
159 <option fcklang="DlgCellWordWrapNo" value="false">No</option>
160 </select></td>
161 </tr>
162 <tr>
163 <td>
164 &nbsp;</td>
165 <td>
166 &nbsp;</td>
167 </tr>
168 <tr>
169 <td nowrap="nowrap">
170 <span fcklang="DlgCellHorAlign">Horizontal Alignment</span>:</td>
171 <td>
172 &nbsp;<select id="selHAlign" name="selAlignment">
173 <option fcklang="DlgCellHorAlignNotSet" value="" selected>&lt;Not set&gt;</option>
174 <option fcklang="DlgCellHorAlignLeft" value="left">Left</option>
175 <option fcklang="DlgCellHorAlignCenter" value="center">Center</option>
176 <option fcklang="DlgCellHorAlignRight" value="right">Right</option>
177 </select></td>
178 </tr>
179 <tr>
180 <td nowrap="nowrap">
181 <span fcklang="DlgCellVerAlign">Vertical Alignment</span>:</td>
182 <td>
183 &nbsp;<select id="selVAlign" name="selAlignment">
184 <option fcklang="DlgCellVerAlignNotSet" value="" selected>&lt;Not set&gt;</option>
185 <option fcklang="DlgCellVerAlignTop" value="top">Top</option>
186 <option fcklang="DlgCellVerAlignMiddle" value="middle">Middle</option>
187 <option fcklang="DlgCellVerAlignBottom" value="bottom">Bottom</option>
188 <option fcklang="DlgCellVerAlignBaseline" value="baseline">Baseline</option>
189 </select></td>
190 </tr>
191 </table>
192 </td>
193 <td>
194 &nbsp;&nbsp;&nbsp;</td>
195 <td align="right">
196 <table cellspacing="0" cellpadding="0" border="0">
197 <tr>
198 <td nowrap="nowrap">
199 <span fcklang="DlgCellRowSpan">Rows Span</span>:</td>
200 <td>
201 &nbsp;
202 <input onkeypress="return IsDigit(event);" id="txtRowSpan" type="text" maxlength="3" size="2"
203 name="txtRows"></td>
204 <td>
205 </td>
206 </tr>
207 <tr>
208 <td nowrap="nowrap">
209 <span fcklang="DlgCellCollSpan">Columns Span</span>:</td>
210 <td>
211 &nbsp;
212 <input onkeypress="return IsDigit(event);" id="txtCollSpan" type="text" maxlength="2"
213 size="2" name="txtColumns"></td>
214 <td>
215 </td>
216 </tr>
217 <tr>
218 <td>
219 &nbsp;</td>
220 <td>
221 &nbsp;</td>
222 <td>
223 &nbsp;</td>
224 </tr>
225 <tr>
226 <td nowrap="nowrap">
227 <span fcklang="DlgCellBackColor">Background Color</span>:</td>
228 <td>
229 &nbsp;<input id="txtBackColor" type="text" size="8" name="txtCellSpacing"></td>
230 <td>
231 &nbsp;
232 <input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Back' )"></td>
233 </tr>
234 <tr>
235 <td nowrap="nowrap">
236 <span fcklang="DlgCellBorderColor">Border Color</span>:</td>
237 <td>
238 &nbsp;<input id="txtBorderColor" type="text" size="8" name="txtCellPadding" /></td>
239 <td>
240 &nbsp;
241 <input type="button" fcklang="DlgCellBtnSelect" value="Select..." onclick="SelectColor( 'Border' )" /></td>
242 </tr>
243 </table>
244 </td>
245 </tr>
246 </table>
247 </td>
248 </tr>
249 </table>
250</body>
251</html>
Note: See TracBrowser for help on using the repository browser.