Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
edit_table_props.php
1 <?php
27 header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
28 header('Pragma: no-cache');
29 header('Expires: '.gmdate('D, d M Y H:i:s', time()-3600).' GMT');
30 
31 include(dirname(__FILE__).'/header.php');
32 ?>
33 <script type="text/javascript" language="javascript" src="<?php echo sq_web_path('lib')?>/js/general.js"></script>
34 <script language="JavaScript" type="text/javascript">
35 
36  function popup_init() {
37 
38  var data = owner.bodycopy_current_edit["data"]["attributes"];
39  var f = document.main_form;
40 
41  f.width.value = (data['width'] == null) ? "" : data['width'];
42  f.height.value = (data['height'] == null) ? "" : data['height'];
43  f.bgcolor.value = (data['bgcolor'] == null) ? "" : data['bgcolor'];
44  //f.background.value = (data['background'] == null) ? "" : data['background'];
45  f.identifier.value = (data['identifier'] == null) ? "" : data['identifier'];
46  f.desc.value = (data['desc'] == null) ? "" : data['desc'];
47  owner.highlight_combo_value(f.align, data['align']);
48  owner.highlight_combo_value(f.border, data['border']);
49  owner.highlight_combo_value(f.cellspacing, data['cellspacing']);
50  owner.highlight_combo_value(f.cellpadding, data['cellpadding']);
51 
52  f.tableid.value = owner.bodycopy_current_edit["data"]["tableid"];
53  f.bodycopy_name.value = owner.bodycopy_current_edit["bodycopy_name"];
54 
55  f.disable_keywords.checked = (data["disable_keywords"] == "1");
56  f.dir.value = (data['dir'] == null) ? "" : data['dir'];
57 
58  }// end popup_init()
59 
60  function popup_save(f) {
61  var data = new Object();
62  data["identifier"] = owner.form_element_value(f.identifier);
63  data["desc"] = owner.form_element_value(f.desc);
64  data["width"] = owner.form_element_value(f.width);
65  data["height"] = owner.form_element_value(f.height);
66  data["bgcolor"] = owner.form_element_value(f.bgcolor);
67  //data["background"] = owner.form_element_value(f.background);
68  data["background"] = '';
69  data["align"] = owner.form_element_value(f.align);
70  data["border"] = owner.form_element_value(f.border);
71  data["cellspacing"] = owner.form_element_value(f.cellspacing);
72  data["cellpadding"] = owner.form_element_value(f.cellpadding);
73  data["disable_keywords"] = owner.form_element_value(f.disable_keywords);
74  data["dir"] = owner.form_element_value(f.dir);
75  owner.bodycopy_save_table_properties(data);
76  }
77 
78 </script>
79 
80 <div class="title">
81  Table Properties
82 </div>
83 <script language="JavaScript">
84 if (owner.bodycopy_current_edit["can_delete"] == false) { document.getElementById('sq_edit_div_props_delete').innerHTML = '&nbsp;'; }
85 </script>
86 
87 <form name="main_form">
88 <input type="hidden" name="bodycopy_name" value="">
89 <input type="hidden" name="tableid" value="">
90 <table width="100%" border="0">
91  <tr>
92  <td>
93  <fieldset>
94  <legend><b><?php echo translate('identification'); ?></b></legend>
95  <table style="width:100%">
96  <tr>
97  <td class="label"><?php echo translate('name'); ?>:</td>
98  <td><input type="text" name="identifier" value="" size="20"></td>
99  </tr>
100  <tr>
101  <td class="label"><?php echo translate('description'); ?>:</td>
102  <td><textarea name="desc" rows="3" size="20" value=""></textarea></td>
103  </tr>
104  </table>
105  </fieldset>
106  </td>
107  </tr>
108  <tr>
109  <td>
110  <table width="90%" cellspacing="0" cellpadding="0">
111  <tr>
112  <td valign="top" width="45%">
113  <fieldset>
114  <legend><b><?php echo translate('layout'); ?></b></legend>
115  <table style="width:100%">
116  <tr>
117  <td class="label"><?php echo translate('width'); ?>:</td>
118  <td><input type="text" name="width" value="" size="5"></td>
119  </tr>
120  <tr>
121  <td class="label"><?php echo translate('height'); ?>:</td>
122  <td><input type="text" name="height" value="" size="5"></td>
123  </tr>
124  <tr>
125  <td class="label"><?php echo translate('alignment'); ?>:</td>
126  <td>
127  <select name="align">
128  <option value="">
129  <option value="left" ><?php echo translate('left'); ?>
130  <option value="center"><?php echo translate('centre'); ?>
131  <option value="right" ><?php echo translate('right'); ?>
132  </select>
133  </td>
134  </tr>
135  </table>
136  </fieldset>
137  </td>
138  <td>&nbsp;</td>
139  <td valign="top" width="45%">
140  <fieldset>
141  <legend><b><?php echo translate('spacing_and_padding'); ?></b></legend>
142  <table style="width:100%">
143  <tr>
144  <td class="label"><?php echo translate('spacing'); ?>:</td>
145  <td>
146  <select name="cellspacing">
147  <option value="" >
148  <option value="0">0
149  <option value="1">1
150  <option value="2">2
151  <option value="3">3
152  <option value="4">4
153  <option value="5">5
154  <option value="6">6
155  <option value="7">7
156  <option value="8">8
157  <option value="9">9
158  <option value="10">10
159  </select>
160  </td>
161  </tr>
162  <tr>
163  <td class="label"><?php echo translate('padding'); ?>:</td>
164  <td>
165  <select name="cellpadding">
166  <option value="" >
167  <option value="0">0
168  <option value="1">1
169  <option value="2">2
170  <option value="3">3
171  <option value="4">4
172  <option value="5">5
173  <option value="6">6
174  <option value="7">7
175  <option value="8">8
176  <option value="9">9
177  <option value="10">10
178  </select>
179  </td>
180  </tr>
181  </table>
182  </fieldset>
183  </td>
184  </tr>
185  </table>
186  </td>
187  </tr>
188  <tr>
189  <td width="100%">
190  <fieldset>
191  <legend><b><?php echo translate('text_direction'); ?></b></legend>
192  <table style="width:100%">
193  <tr>
194  <td class="bodycopy-popup-heading"><?php echo translate('bodycopy_direction'); ?></td>
195  <td>
196  <select name="dir">
197  <option value=""><?php echo translate('content_type_no_change'); ?></option>
198  <option value="ltr"><?php echo translate('bodycopy_left_to_right'); ?></option>
199  <option value="rtl"><?php echo translate('bodycopy_right_to_left'); ?></option>
200  </select>
201  </td>
202  </tr>
203  </table>
204  </fieldset>
205  </td>
206  </tr>
207  <tr>
208  <td width="100%">
209  <fieldset>
210  <legend><b><?php echo translate('table_styles-colours'); ?></b></legend>
211  <table>
212  <tr>
213  <td class="label"><?php echo translate('background_colour'); ?>:</td>
214  <td><?php colour_box('bgcolor', '', TRUE, '*',TRUE, FALSE, FALSE);?></td>
215  </tr>
216  <!-- <tr>
217  <td class="label">Background Image:</td>
218  <td><input type="text" name="background" value="" size="5"></td>
219  </tr> -->
220  <tr>
221  <td class="label" valign="top"><?php echo translate('border'); ?>:</td>
222  <td valign="top">
223  <select name="border">
224  <option value="" >
225  <option value="0">0
226  <option value="1">1
227  <option value="2">2
228  <option value="3">3
229  <option value="4">4
230  <option value="5">5
231  <option value="6">6
232  <option value="7">7
233  <option value="8">8
234  <option value="9">9
235  <option value="10">10
236  </select>
237  </td>
238  </tr>
239  </table>
240  </fieldset>
241  </td>
242  </tr>
243  <tr>
244  <td width="100%">
245  <fieldset>
246  <legend><b><?php echo translate('keywords'); ?></b></legend>
247  <table>
248  <tr>
249  <td class="label"><?php echo translate('disable_keywords'); ?>:</td>
250  <td><input type="checkbox" name="disable_keywords" value="1"></td>
251  </tr>
252  </table>
253  </fieldset>
254  </td>
255  </tr>
256  <tr>
257  <td>
258  <fieldset>
259  <legend><b><?php echo translate('delete_this_table'); ?></b></legend>
260  <table>
261  <tr>
262  <td class="label"><?php echo translate('click_to_delete'); ?>:</td>
263  <td>
264  <a href="javascript: owner.bodycopy_delete_table(document.main_form.bodycopy_name.value, document.main_form.tableid.value);" style="cursor: pointer;"><script language="JavaScript" type="text/javascript">sq_print_icon("<?php echo sq_web_path('data')?>/asset_types/bodycopy/images/icons/delete.png", "16", "16", "Delete this table");</script></a>
265  </td>
266  </tr>
267  </table>
268  </fieldset>
269  </td>
270  </tr>
271  <tr>
272  <td>
273  <div style="text-align: center;">
274  <button type="button" name="ok" onClick="javascript: popup_save(this.form)"><?php echo translate('ok'); ?></button>
275  &nbsp;
276  <button type="button" name="cancel" onClick="javascript: popup_close();"><?php echo translate('cancel'); ?></button>
277  </div>
278  </td>
279  </tr>
280 </table>
281 </form>
282 
283 <?php include(dirname(__FILE__).'/footer.php'); ?>