source: www/openwebmail/javascript/htmlarea.openwebmail/popups/zh_CN.utf8/insert_table.html@ 1

Last change on this file since 1 was 1, checked in by george, 17 years ago

Prvotní import všeho

File size: 4.6 KB
Line 
1<html style="width: 398; height: 218">
2
3<head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <title>插入表格</title>
6
7<script type="text/javascript" src="popup.js"></script>
8
9<script type="text/javascript">
10
11function Init() {
12 __dlg_init();
13 document.getElementById("f_rows").focus();
14};
15
16function onOK() {
17 var required = {
18 "f_rows": "您必须输入表格的列数",
19 "f_cols": "您必须输入表格的栏位个数"
20 };
21 for (var i in required) {
22 var el = document.getElementById(i);
23 if (!el.value) {
24 alert(required[i]);
25 el.focus();
26 return false;
27 }
28 }
29 var fields = ["f_rows", "f_cols", "f_width", "f_unit",
30 "f_align", "f_border", "f_spacing", "f_padding"];
31 var param = new Object();
32 for (var i in fields) {
33 var id = fields[i];
34 var el = document.getElementById(id);
35 param[id] = el.value;
36 }
37 __dlg_close(param);
38 return false;
39};
40
41function onCancel() {
42 __dlg_close(null);
43 return false;
44};
45
46</script>
47
48<style type="text/css">
49html, body {
50 background: ButtonFace;
51 color: ButtonText;
52 font: 11px Tahoma,Verdana,sans-serif;
53 margin: 0px;
54 padding: 0px;
55}
56body { padding: 5px; }
57table {
58 font: 11px Tahoma,Verdana,sans-serif;
59}
60form p {
61 margin-top: 5px;
62 margin-bottom: 5px;
63}
64.fl { width: 9em; float: left; padding: 2px 5px; text-align: right; }
65.fr { width: 7em; float: left; padding: 2px 5px; text-align: right; }
66fieldset { padding: 0px 10px 5px 5px; }
67select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
68button { width: 70px; }
69.space { padding: 2px; }
70
71.title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
72border-bottom: 1px solid black; letter-spacing: 2px;
73}
74form { padding: 0px; margin: 0px; }
75</style>
76
77</head>
78
79<body onload="Init()">
80
81<div class="title">插入表格</div>
82
83<form action="" method="get">
84<table border="0" style="padding: 0px; margin: 0px">
85 <tbody>
86
87 <tr>
88 <td style="width: 4em; text-align: right">列:</td>
89 <td><input type="text" name="rows" id="f_rows" size="5" title="Number of rows" value="2" /></td>
90 <td></td>
91 <td></td>
92 <td></td>
93 </tr>
94 <tr>
95 <td style="width: 4em; text-align: right">栏:</td>
96 <td><input type="text" name="cols" id="f_cols" size="5" title="Number of columns" value="4" /></td>
97 <td style="width: 4em; text-align: right">宽度:</td>
98 <td><input type="text" name="width" id="f_width" size="5" title="Width of the table" value="100" /></td>
99 <td><select size="1" name="unit" id="f_unit" title="Width unit">
100 <option value="%" selected="1" >百分比</option>
101 <option value="px" >像素</option>
102 <option value="em" >Em</option>
103 </select></td>
104 </tr>
105
106 </tbody>
107</table>
108
109<p />
110
111<fieldset style="float: left; margin-left: 5px;">
112<legend>外观</legend>
113
114<div class="space"></div>
115
116<div class="fl">对齐方式:</div>
117<select size="1" name="align" id="f_align"
118 title="Positioning of this table">
119 <option value="" selected="1" ></option>
120 <option value="left" ></option>
121 <option value="right" ></option>
122 <option value="texttop" >文字上方</option>
123 <option value="absmiddle" >绝对中间</option>
124 <option value="baseline" selected="1" >基准线</option>
125 <option value="absbottom" >绝对下面</option>
126 <option value="bottom" >下面</option>
127 <option value="middle" >中间</option>
128 <option value="top" >上面</option>
129</select>
130
131<p />
132
133<div class="fl">边框厚度:</div>
134<input type="text" name="border" id="f_border" size="5" value="1"
135title="如果不要边框的话这格请空白" />
136<!--
137<p />
138
139<div class="fl">Collapse borders:</div>
140<input type="checkbox" name="collapse" id="f_collapse" />
141-->
142<div class="space"></div>
143
144</fieldset>
145
146<fieldset style="float:right; margin-right: 5px;">
147<legend>间距</legend>
148
149<div class="space"></div>
150
151<div class="fr">格外间距:</div>
152<input type="text" name="spacing" id="f_spacing" size="5" value="1"
153title="表格格子间的距离" />
154
155<p />
156
157<div class="fr">格内间距:</div>
158<input type="text" name="padding" id="f_padding" size="5" value="1"
159title="表格格中内容与格子边的距离" />
160
161<div class="space"></div>
162
163</fieldset>
164
165<div style="margin-top: 85px; text-align: right;">
166<hr />
167<button type="button" name="ok" onclick="return onOK();">确定</button>
168<button type="button" name="cancel" onclick="return onCancel();">取消</button>
169</div>
170
171</form>
172
173</body>
174</html>
Note: See TracBrowser for help on using the repository browser.