implement JS support for restoring filters in addition to adding them

pull/6827/head
Tim Felgentreff 14 years ago
parent b92a0e7ddb
commit 4fc6b7fa68
  1. 9
      assets/javascripts/reporting/restore_query.js

@ -60,9 +60,18 @@ Reporting.RestoreQuery = {
var name = $(group_by).getAttribute("value");
Reporting.RestoreQuery.show_group_by(name, $('group_by_' + axis + 's'));
});
},
restore_filters: function () {
// FIXME: rm_xxx values for filters have to be set after re-displaying them
$$("tr[data-selected=true]").each(function (e) {
var rm_box = e.select("input[id^=rm]").first();
rm_box.value = rm_box.getAttribute("data-filter-name");
});
}
};
Reporting.onload(function () {
Reporting.RestoreQuery.restore_group_bys();
Reporting.RestoreQuery.restore_filters();
});

Loading…
Cancel
Save