##// END OF EJS Templates
Allows double click to move columns between available/selected columns....
Jean-Philippe Lang -
r7745:85db02d486d6
parent child
Show More
@@ -1,32 +1,34
1 1 <table style="border-collapse: collapse; border:0;">
2 2 <tr>
3 3 <td style="padding-left:0">
4 4 <%= label_tag "available_columns", l(:description_available_columns) %>
5 5 <br />
6 6 <%= select_tag 'available_columns',
7 7 options_for_select((query.available_columns - query.columns).collect {|column| [column.caption, column.name]}),
8 :multiple => true, :size => 10, :style => "width:150px" %>
8 :multiple => true, :size => 10, :style => "width:150px",
9 :ondblclick => "moveOptions(this.form.available_columns, this.form.selected_columns);" %>
9 10 </td>
10 11 <td align="center" valign="middle">
11 12 <input type="button" value="&#8594;"
12 13 onclick="moveOptions(this.form.available_columns, this.form.selected_columns);" /><br />
13 14 <input type="button" value="&#8592;"
14 15 onclick="moveOptions(this.form.selected_columns, this.form.available_columns);" />
15 16 </td>
16 17 <td>
17 18 <%= label_tag "selected_columns", l(:description_selected_columns) %>
18 19 <br />
19 20 <%= select_tag 'c[]',
20 21 options_for_select(query.columns.collect {|column| [column.caption, column.name]}),
21 :id => 'selected_columns', :multiple => true, :size => 10, :style => "width:150px" %>
22 :id => 'selected_columns', :multiple => true, :size => 10, :style => "width:150px",
23 :ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %>
22 24 </td>
23 25 <td align="center" valign="middle">
24 26 <input type="button" value="&#8593;" onclick="moveOptionUp(this.form.selected_columns);" /><br />
25 27 <input type="button" value="&#8595;" onclick="moveOptionDown(this.form.selected_columns);" />
26 28 </td>
27 29 </tr>
28 30 </table>
29 31
30 32 <% content_for :header_tags do %>
31 33 <%= javascript_include_tag 'select_list_move' %>
32 34 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now