Do not hardcode reset filter value

This commit is contained in:
Frederic Guillot
2015-10-11 17:24:56 -04:00
parent dc0749ecce
commit c77c9443e9
3 changed files with 6 additions and 5 deletions

View File

@@ -89,14 +89,15 @@ Search.prototype.keyboardShortcuts = function() {
// Reset to the search field
Mousetrap.bind("r", function(e) {
e.preventDefault();
$("#form-search").val("status:open");
var reset = $(".filter-reset").data("filter");
$("#form-search").val(reset);
if ($('#board').length) {
self.app.board.reloadFilters("status:open");
self.app.board.reloadFilters(reset);
}
else {
$("form.search").submit();
}
});
};