[#66,filters,view][m]: new FilterEditor view which shows current filters and allowed them to be removed.

This commit is contained in:
Rufus Pollock
2012-04-08 10:47:25 +01:00
parent 9a3c0523c6
commit 008c124096
3 changed files with 94 additions and 6 deletions

View File

@@ -217,6 +217,15 @@ my.Query = Backbone.Model.extend({
// change does not seem to be triggered ...
this.trigger('change');
},
// ### removeFilter
//
// Remove a filter from filters at index filterIndex
removeFilter: function(filterIndex) {
var filters = this.get('filters');
filters.splice(filterIndex, 1);
this.set({filters: filters});
this.trigger('change');
},
// ### addFacet
//
// Add a Facet to this query