diff --git a/assets/javascripts/reporting/filters.js b/assets/javascripts/reporting/filters.js index 61ff5de400..1fa8cc2c08 100644 --- a/assets/javascripts/reporting/filters.js +++ b/assets/javascripts/reporting/filters.js @@ -8,6 +8,7 @@ Reporting.Filters = { if (select === null || select === undefined) { return; } + url = select.readAttribute("remote-url"); json_post_select_values = select.readAttribute('data-initially-selected') if (json_post_select_values !== null && json_post_select_values !== undefined) { post_select_values = json_post_select_values.replace(/'/g, '"').evalJSON(true); @@ -17,7 +18,7 @@ Reporting.Filters = { window.global_prefix = ""; } - new Ajax.Updater({ success: select.id }, window.global_prefix + '/reporting/available_values', { + new Ajax.Updater({ success: select.id }, url, { parameters: { filter_name: filter_name, values: json_post_select_values diff --git a/lib/widget/filters/multi_values.rb b/lib/widget/filters/multi_values.rb index 0cf9389e13..194c5dd37c 100644 --- a/lib/widget/filters/multi_values.rb +++ b/lib/widget/filters/multi_values.rb @@ -4,7 +4,8 @@ class Widget::Filters::MultiValues < Widget::Filters::Base def render write(content_tag :td do content_tag :div, :id => "#{filter_class.underscore_name}_arg_1", :class => "filter_values" do - select_options = { :style => "vertical-align: top;", # FIXME: Do CSS + select_options = { :"remote-url" => url_for(:controller => "cost_reports", :action => "available_values"), + :style => "vertical-align: top;", # FIXME: Do CSS :name => "values[#{filter_class.underscore_name}][]", :"data-loading" => @options[:lazy] ? "ajax" : "", :id => "#{filter_class.underscore_name}_arg_1_val",