fix filter setting/unsetting. the input value has to be manually set/unset when adding/removing filters.

pull/6827/head
jwollert 14 years ago
parent 402f6fdf32
commit 724dbf7c97
  1. 4
      assets/javascripts/reporting/filters.js

@ -44,13 +44,15 @@ Reporting.Filters = {
var field_el = $('tr_' + field);
if (field_el !== null) {
// the following command might be included into the callback_function (which is called after the ajax request) later
$('rm_' + field).value = field;
var display_functor;
if (options.show_filter) {
display_functor = options.slowly ? Effect.Appear : Element.show;
Reporting.Filters.load_available_values_for_filter(field, options.callback_func);
$('rm_' + field).value = field; // set the value, so the serialized form will return this filter
} else {
display_functor = options.slowly ? Effect.Fade : Element.hide;
field_el.removeAttribute('data-selected');
$('rm_' + field).value = ""; // reset the value, so the serialized form will not return this filter
}
display_functor(field_el);
Reporting.Filters.operator_changed(field, $("operators_" + field));

Loading…
Cancel
Save