##// END OF EJS Templates
Merged r12990 and r12991 (#16326)....
Jean-Philippe Lang -
r12748:33a7f6bc1179
parent child
Show More
@@ -23,8 +23,10
23 23 :ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %>
24 24 </td>
25 25 <td class="buttons">
26 <input type="button" value="&#8648;" onclick="moveOptionTop(this.form.selected_columns);" /><br />
26 27 <input type="button" value="&#8593;" onclick="moveOptionUp(this.form.selected_columns);" /><br />
27 <input type="button" value="&#8595;" onclick="moveOptionDown(this.form.selected_columns);" />
28 <input type="button" value="&#8595;" onclick="moveOptionDown(this.form.selected_columns);" /><br />
29 <input type="button" value="&#8650;" onclick="moveOptionBottom(this.form.selected_columns);" />
28 30 </td>
29 31 </tr>
30 32 </table>
@@ -51,6 +51,17 function moveOptionUp(theSel) {
51 51 }
52 52 }
53 53
54 function moveOptionTop(theSel) {
55 var index = theSel.selectedIndex;
56
57 if (index > 0) {
58 for (i=index; i>0; i--) {
59 swapOptions(theSel, i-1, i);
60 }
61 theSel.selectedIndex = 0;
62 }
63 }
64
54 65 function moveOptionDown(theSel) {
55 66 var index = theSel.selectedIndex;
56 67 if (index < theSel.length - 1) {
@@ -59,6 +70,17 function moveOptionDown(theSel) {
59 70 }
60 71 }
61 72
73 function moveOptionBottom(theSel) {
74 var index = theSel.selectedIndex;
75 var indexTop = theSel.length - 1;
76 if (index < theSel.length - 1) {
77 for (i=index; i<indexTop; i++) {
78 swapOptions(theSel, i+1, i);
79 }
80 theSel.selectedIndex = indexTop;
81 }
82 }
83
62 84 // OK
63 85 function selectAllOptions(id) {
64 86 var select = $('#'+id);
@@ -263,6 +263,7 table.query-columns td.buttons {
263 263 vertical-align: middle;
264 264 text-align: center;
265 265 }
266 table.query-columns td.buttons input[type=button] {width:35px;}
266 267
267 268 td.center {text-align:center;}
268 269
General Comments 0
You need to be logged in to leave comments. Login now