@@ -23,8 +23,10 | |||||
23 | :ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %> |
|
23 | :ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %> | |
24 | </td> |
|
24 | </td> | |
25 | <td class="buttons"> |
|
25 | <td class="buttons"> | |
|
26 | <input type="button" value="⇈" onclick="moveOptionTop(this.form.selected_columns);" /><br /> | |||
26 | <input type="button" value="↑" onclick="moveOptionUp(this.form.selected_columns);" /><br /> |
|
27 | <input type="button" value="↑" onclick="moveOptionUp(this.form.selected_columns);" /><br /> | |
27 | <input type="button" value="↓" onclick="moveOptionDown(this.form.selected_columns);" /> |
|
28 | <input type="button" value="↓" onclick="moveOptionDown(this.form.selected_columns);" /><br /> | |
|
29 | <input type="button" value="⇊" onclick="moveOptionBottom(this.form.selected_columns);" /> | |||
28 | </td> |
|
30 | </td> | |
29 | </tr> |
|
31 | </tr> | |
30 | </table> |
|
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 | function moveOptionDown(theSel) { |
|
65 | function moveOptionDown(theSel) { | |
55 | var index = theSel.selectedIndex; |
|
66 | var index = theSel.selectedIndex; | |
56 | if (index < theSel.length - 1) { |
|
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 | // OK |
|
84 | // OK | |
63 | function selectAllOptions(id) { |
|
85 | function selectAllOptions(id) { | |
64 | var select = $('#'+id); |
|
86 | var select = $('#'+id); |
@@ -263,6 +263,7 table.query-columns td.buttons { | |||||
263 | vertical-align: middle; |
|
263 | vertical-align: middle; | |
264 | text-align: center; |
|
264 | text-align: center; | |
265 | } |
|
265 | } | |
|
266 | table.query-columns td.buttons input[type=button] {width:35px;} | |||
266 |
|
267 | |||
267 | td.center {text-align:center;} |
|
268 | td.center {text-align:center;} | |
268 |
|
269 |
General Comments 0
You need to be logged in to leave comments.
Login now