Allows double click to move columns between available/selected columns.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7865 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-11-20 10:07:11 +00:00
parent 06bc4e50ef
commit 85db02d486
1 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,8 @@
<br /> <br />
<%= select_tag 'available_columns', <%= select_tag 'available_columns',
options_for_select((query.available_columns - query.columns).collect {|column| [column.caption, column.name]}), options_for_select((query.available_columns - query.columns).collect {|column| [column.caption, column.name]}),
:multiple => true, :size => 10, :style => "width:150px" %> :multiple => true, :size => 10, :style => "width:150px",
:ondblclick => "moveOptions(this.form.available_columns, this.form.selected_columns);" %>
</td> </td>
<td align="center" valign="middle"> <td align="center" valign="middle">
<input type="button" value="&#8594;" <input type="button" value="&#8594;"
@ -18,7 +19,8 @@
<br /> <br />
<%= select_tag 'c[]', <%= select_tag 'c[]',
options_for_select(query.columns.collect {|column| [column.caption, column.name]}), options_for_select(query.columns.collect {|column| [column.caption, column.name]}),
:id => 'selected_columns', :multiple => true, :size => 10, :style => "width:150px" %> :id => 'selected_columns', :multiple => true, :size => 10, :style => "width:150px",
:ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %>
</td> </td>
<td align="center" valign="middle"> <td align="center" valign="middle">
<input type="button" value="&#8593;" onclick="moveOptionUp(this.form.selected_columns);" /><br /> <input type="button" value="&#8593;" onclick="moveOptionUp(this.form.selected_columns);" /><br />