Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
edit_table_orderer.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 language="JavaScript" type="text/javascript">
34 
35  var order_type = null;
36 
37  function popup_init() {
38 
39  order_type = owner.bodycopy_current_edit["data"]["order_type"];
40  var type_order = owner.bodycopy_current_edit["data"][order_type + "_order"];
41  var f = document.main_form;
42 
43  // remove all old entries
44  while(f.type_order.options.length) {
45  f.type_order.options[0] = null;
46  }
47 
48  for(var i = 0; i < type_order.length; i++) {
49  f.type_order.options[i] = new Option(type_order[i], i);
50  }
51 
52  }// end popup_init()
53 
54  function popup_save(f) {
55 
56  var type_order = new Array();
57  for(var i = 0; i < f.type_order.options.length; i++) {
58  type_order[i] = f.type_order.options[i].value;
59  }
60 
61  switch(order_type) {
62  case "table" :
63  owner.bodycopy_save_table_order(type_order);
64  break;
65 
66  case "row" :
67  owner.bodycopy_save_table_row_order(type_order);
68  break;
69 
70  case "col" :
71  owner.bodycopy_save_table_col_order(type_order);
72  break;
73 
74  default :
75  alert(js_translate('order_type_unknown', order_type));
76 
77  }//end switch
78 
79  }// end popup_save()
80 
81  function popup_move_type(move_up) {
82  owner.move_combo_selection(document.main_form.type_order, move_up);
83  }
84 
85 </script>
86 <table width="100%" border="0">
87 <form name="main_form">
88  <tr>
89  <td nowrap class="bodycopy-popup-heading"><?php echo translate('reorderer'); ?></td>
90  </tr>
91  <tr>
92  <td><hr></td>
93  </tr>
94  <tr>
95  <td align="center">
96  <table border="0" cellspacing="3" cellpadding="0">
97  <tr>
98  <td>
99  <select name="type_order" size="10">
100  <!-- good old Netscape :) -->
101  <option value="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
102  </select>
103  </td>
104  <td>
105  <a href="#" onClick="javascript: popup_move_type(true); return false;" onMouseOver="window.status='Move the Selection Up'; return true;" onMouseOut="javascript: window.status=''; return true;"><img src="<?php echo sq_web_path('data')?>/asset_types/bodycopy/images/up_arrow.gif" width="15" height="15" border="0"></a><br>
106  <br>
107  <br>
108  <a href="#" onClick="javascript: popup_move_type(false); return false;" onMouseOver="window.status='Move the Selection Down'; return true;" onMouseOut="javascript: window.status=''; return true;"><img src="<?php echo sq_web_path('data')?>/asset_types/bodycopy/images/down_arrow.gif" width="15" height="15" border="0"></a>
109  </td>
110  </tr>
111  </table>
112  </td>
113  </tr>
114  <tr>
115  <td>
116  <hr>
117  </td>
118  </tr>
119  <tr>
120  <td align="center">
121  <input type="button" value="Save" onclick="javascript: popup_save(this.form)">
122  <input type="button" value="Cancel" onclick="javascript: popup_close();">
123  </td>
124  </tr>
125 </form>
126 </table>
127 <?php include(dirname(__FILE__).'/footer.php'); ?>