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
pull/6827/head
p.tessenow 14 years ago
parent 5c38decdbc
commit cc70371849
  1. 1
      app/views/cost_reports/filters/_multi_values.rhtml
  2. 2
      assets/javascripts/reporting.js

@ -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 %>
</select>

@ -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',

Loading…
Cancel
Save