From cc7037184926cc7cd3f4959726ada3f7c9e9be29 Mon Sep 17 00:00:00 2001 From: "p.tessenow" Date: Tue, 28 Sep 2010 12:13:58 +0000 Subject: [PATCH] on put ajax-requests on filters where we have data to load git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1816 7926756e-e54e-46e6-9721-ed318f58905e --- app/views/cost_reports/filters/_multi_values.rhtml | 1 + assets/javascripts/reporting.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/cost_reports/filters/_multi_values.rhtml b/app/views/cost_reports/filters/_multi_values.rhtml index 3e347cb9d8..c84a363d60 100644 --- a/app/views/cost_reports/filters/_multi_values.rhtml +++ b/app/views/cost_reports/filters/_multi_values.rhtml @@ -12,6 +12,7 @@ name="values[<%= element[:filter_name] %>][]" id="<%= element[:filter_name] %>_arg_1_val" class="select-small" + data-loading="ajax" multiple="multiple"> <%# multiple will be disabled/enabled later by JavaScript anyhow. We need to specify multiple here because of a IE6-bug. %> <%# content will be inserted on filter activation %> diff --git a/assets/javascripts/reporting.js b/assets/javascripts/reporting.js index ff05cb09f4..08a11551f5 100644 --- a/assets/javascripts/reporting.js +++ b/assets/javascripts/reporting.js @@ -467,7 +467,7 @@ function init_group_bys() { function load_available_values_for_filter(filter_name) { var select; select = $('' + filter_name + '_arg_1_val'); - if (select.childElements().length == 0) { + if (select.readAttribute('data-loading') == "ajax" && select.childElements().length == 0) { new Ajax.Updater({ success: select }, '/cost_reports/available_values', { parameters: { filter_name: filter_name }, insertion: 'bottom',