[#147,widget/filtereditor][m]: add filter support in filter widget plus move to sidebar and tidy up.

* model.js: xsmall tweak to set value of term filter to empty string rather than null.
This commit is contained in:
Rufus Pollock
2012-06-06 23:59:09 +01:00
parent 68b6a9356f
commit 26350fec06
6 changed files with 100 additions and 39 deletions

View File

@@ -425,7 +425,7 @@ my.Query = Backbone.Model.extend({
addTermFilter: function(fieldId, value) {
var filters = this.get('filters');
var filter = { term: {} };
filter.term[fieldId] = value;
filter.term[fieldId] = value || '';
filters.push(filter);
this.set({filters: filters});
// change does not seem to be triggered automatically