From 3c1a51b486e993bebfaea3a19793ad58877c966c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 18 Sep 2011 02:02:57 +0000 Subject: [PATCH] replace tabs to spaces at app/views/queries/_filters.html.erb git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7384 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/queries/_filters.html.erb | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/app/views/queries/_filters.html.erb b/app/views/queries/_filters.html.erb index 972da69c8..09172eef1 100644 --- a/app/views/queries/_filters.html.erb +++ b/app/views/queries/_filters.html.erb @@ -30,22 +30,22 @@ function toggle_filter(field) { } function enableValues(field, indexes) { - var f = $$(".values_" + field); - for(var i=0;i 0) { - Element.show("div_values_" + field); - } else { - Element.hide("div_values_" + field); - } + } + } + if (indexes.length > 0) { + Element.show("div_values_" + field); + } else { + Element.hide("div_values_" + field); + } } function toggle_operator(field) { @@ -121,7 +121,7 @@ Event.observe(document,"dom:loaded", apply_filters_observer); <% case options[:type] when :list, :list_optional, :list_status, :list_subprojects %> - <%= select_tag "v[#{field}][]", options_for_select(options[:values], query.values_for(field)), :class => "values_#{field}", :id => "values_#{field}_1", :multiple => (query.values_for(field) && query.values_for(field).length > 1) %> + <%= select_tag "v[#{field}][]", options_for_select(options[:values], query.values_for(field)), :class => "values_#{field}", :id => "values_#{field}_1", :multiple => (query.values_for(field) && query.values_for(field).length > 1) %> <%= link_to_function image_tag('bullet_toggle_plus.png'), "toggle_multi_select('values_#{field}_1');" %> <% when :date, :date_past %> @@ -144,8 +144,8 @@ Event.observe(document,"dom:loaded", apply_filters_observer); <%= label_tag('add_filter_select', l(:label_filter_add)) %> <%= select_tag 'add_filter_select', options_for_select([["",""]] + query.available_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.collect{|field| [ field[1][:name] || l(("field_"+field[0].to_s.gsub(/_id$/, "")).to_sym), field[0]] unless query.has_filter?(field[0])}.compact), - :onchange => "add_filter();", - :name => nil %> + :onchange => "add_filter();", + :name => nil %>