<h2><%= l(:label_query) %></h2>
-<%= form_tag(query_path(@query), :onsubmit => 'selectAllOptions("selected_columns");', :method => :put) do %>
+<%= form_tag(query_path(@query), :method => :put) do %>
<%= render :partial => 'form', :locals => {:query => @query} %>
<%= submit_tag l(:button_save) %>
<% end %>
<h2><%= l(:label_query_new) %></h2>
-<%= form_tag(@project ? project_queries_path(@project) : queries_path, :onsubmit => 'selectAllOptions("selected_columns");') do %>
+<%= form_tag(@project ? project_queries_path(@project) : queries_path) do %>
<%= render :partial => 'form', :locals => {:query => @query} %>
<%= submit_tag l(:button_save) %>
<% end %>
-<%= form_tag({:action => 'edit', :tab => 'issues'}, :onsubmit => 'selectAllOptions("selected_columns");') do %>
+<%= form_tag({:action => 'edit', :tab => 'issues'}) do %>
<div class="box tabular settings">
<p><%= setting_check_box :cross_project_issue_relations %></p>
}
function submit_query_form(id) {
- selectAllOptions("selected_columns");
$('#'+id).submit();
}
$(theSel).find('option:selected').detach().appendTo($(theSel));
}
-function selectAllOptions(id) {
- $('#'+id).find('option').prop('selected', true);
-}
+$(document).ready(function(){
+ $('.query-columns').closest('form').submit(function(){
+ $('#selected_columns option').prop('selected', true);
+ });
+});