summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/queries/edit.html.erb2
-rw-r--r--app/views/queries/new.html.erb2
-rw-r--r--app/views/settings/_issues.html.erb2
-rw-r--r--public/javascripts/application.js1
-rw-r--r--public/javascripts/select_list_move.js8
5 files changed, 8 insertions, 7 deletions
diff --git a/app/views/queries/edit.html.erb b/app/views/queries/edit.html.erb
index a1534f82d..eba719fa1 100644
--- a/app/views/queries/edit.html.erb
+++ b/app/views/queries/edit.html.erb
@@ -1,6 +1,6 @@
<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 %>
diff --git a/app/views/queries/new.html.erb b/app/views/queries/new.html.erb
index 7081eee24..3c1ff3b1c 100644
--- a/app/views/queries/new.html.erb
+++ b/app/views/queries/new.html.erb
@@ -1,6 +1,6 @@
<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 %>
diff --git a/app/views/settings/_issues.html.erb b/app/views/settings/_issues.html.erb
index 83b4acd98..fac6d6dea 100644
--- a/app/views/settings/_issues.html.erb
+++ b/app/views/settings/_issues.html.erb
@@ -1,4 +1,4 @@
-<%= 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>
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 38193b8a0..1577da6b8 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -288,7 +288,6 @@ function toggleMultiSelect(el) {
}
function submit_query_form(id) {
- selectAllOptions("selected_columns");
$('#'+id).submit();
}
diff --git a/public/javascripts/select_list_move.js b/public/javascripts/select_list_move.js
index d542ac624..db0585424 100644
--- a/public/javascripts/select_list_move.js
+++ b/public/javascripts/select_list_move.js
@@ -22,6 +22,8 @@ function moveOptionBottom(theSel) {
$(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);
+ });
+});