source: trunk/popups/insert_table.html @ 109

Last change on this file since 109 was 109, checked in by niko, 14 years ago

#147
use only one global popup.css

  • Property svn:eol-style set to native
  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 4.1 KB
Line 
1<html>
2
3<head>
4  <title>Insert Table</title>
5
6<script type="text/javascript" src="popup.js"></script>
7<link rel="stylesheet" type="text/css" href="popup.css" />
8
9<script type="text/javascript">
10
11window.resizeTo(400, 100);
12
13function Init() {
14  HTMLArea = window.opener.HTMLArea; // load the HTMLArea plugin and lang file
15  __dlg_translate('HTMLArea');
16  __dlg_init();
17  document.getElementById("f_rows").focus();
18};
19
20function onOK() {
21  var required = {
22    "f_rows": "You must enter a number of rows",
23    "f_cols": "You must enter a number of columns"
24  };
25  for (var i in required) {
26    var el = document.getElementById(i);
27    if (!el.value) {
28      alert(required[i]);
29      el.focus();
30      return false;
31    }
32  }
33  var fields = ["f_rows", "f_cols", "f_width", "f_unit", "f_fixed",
34                "f_align", "f_border", "f_spacing", "f_padding"];
35  var param = new Object();
36  for (var i in fields) {
37    var id = fields[i];
38    var el = document.getElementById(id);
39    param[id] = (el.type == "checkbox") ? el.checked : el.value;
40  }
41  __dlg_close(param);
42  return false;
43};
44
45function onCancel() {
46  __dlg_close(null);
47  return false;
48};
49
50</script>
51
52</head>
53
54<body onload="Init()">
55
56<div class="title">Insert Table</div>
57
58<form action="" method="get">
59<table border="0" style="padding: 0px; margin: 0px">
60  <tbody>
61
62  <tr>
63    <td style="width: 4em; text-align: right">Rows:</td>
64    <td><input type="text" name="rows" id="f_rows" size="5" title="Number of rows" value="2" /></td>
65    <td style="width: 4em; text-align: right">Width:</td>
66    <td><input type="text" name="width" id="f_width" size="5" title="Width of the table" value="100" /></td>
67    <td><select size="1" name="unit" id="f_unit" title="Width unit">
68      <option value="%" selected="1"  >Percent</option>
69      <option value="px"              >Pixels</option>
70      <option value="em"              >Em</option>
71    </select></td>
72  </tr>
73  <tr>
74    <td style="width: 4em; text-align: right">Cols:</td>
75    <td><input type="text" name="cols" id="f_cols" size="5" title="Number of columns" value="4" /></td>
76    <td style="text-align: right"><input type="checkbox" checked="checked" name="fixed" id="f_fixed" /></td>
77    <td colspan="2"><label for="f_fixed"
78    >Fixed width columns</label></td>
79  </tr>
80  </tbody>
81</table>
82
83<p />
84
85<fieldset style="float: left; margin-left: 5px;">
86<legend>Layout</legend>
87
88<div class="space"></div>
89
90<div class="fl">Alignment:</div>
91<select size="1" name="align" id="f_align"
92  title="Positioning of this table">
93  <option value="" selected="1"                >Not set</option>
94  <option value="left"                         >Left</option>
95  <option value="right"                        >Right</option>
96  <option value="texttop"                      >Texttop</option>
97  <option value="absmiddle"                    >Absmiddle</option>
98  <option value="baseline"                     >Baseline</option>
99  <option value="absbottom"                    >Absbottom</option>
100  <option value="bottom"                       >Bottom</option>
101  <option value="middle"                       >Middle</option>
102  <option value="top"                          >Top</option>
103</select>
104
105<p />
106
107<div class="fl">Border thickness:</div>
108<input type="text" name="border" id="f_border" size="5" value="1"
109title="Leave empty for no border" />
110<!--
111<p />
112
113<div class="fl">Collapse borders:</div>
114<input type="checkbox" name="collapse" id="f_collapse" />
115-->
116<div class="space"></div>
117
118</fieldset>
119
120<fieldset style="float:right; margin-right: 5px;">
121<legend>Spacing</legend>
122
123<div class="space"></div>
124
125<div class="fr">Cell spacing:</div>
126<input type="text" name="spacing" id="f_spacing" size="5" value="1"
127title="Space between adjacent cells" />
128
129<p />
130
131<div class="fr">Cell padding:</div>
132<input type="text" name="padding" id="f_padding" size="5" value="1"
133title="Space between content and border in cell" />
134
135<div class="space"></div>
136
137</fieldset>
138
139<div style="margin-top: 85px; border-top: 1px solid #999; padding: 2px; text-align: right;">
140<button type="button" name="ok" onclick="return onOK();">OK</button>
141<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
142</div>
143
144</form>
145
146</body>
147</html>
Note: See TracBrowser for help on using the repository browser.