fixes due to changes in filter logic

This commit is contained in:
Anand Doshi 2012-08-16 16:05:50 +05:30
parent 18de6634d5
commit 6cade9a5b7
2 changed files with 5 additions and 5 deletions

View file

@ -54,7 +54,7 @@ wn.ui.Search = Class.extend({
});
}
});
this.list.filter_list.add_filter('name', 'like');
this.list.filter_list.add_filter(this.doctype, 'name', 'like');
this.list.run();
}
})

View file

@ -318,19 +318,19 @@ wn.views.DocListView = wn.ui.Listing.extend({
// second filter set for this field
if(fieldname=='_user_tags') {
// and for tags
this.filter_list.add_filter(fieldname, 'like', '%' + label);
this.filter_list.add_filter(this.doctype, fieldname, 'like', '%' + label);
} else {
// or for rest using "in"
filter.set_values(fieldname, 'in', v + ', ' + label);
filter.set_values(this.doctype, fieldname, 'in', v + ', ' + label);
}
}
} else {
// no filter for this item,
// setup one
if(fieldname=='_user_tags') {
this.filter_list.add_filter(fieldname, 'like', '%' + label);
this.filter_list.add_filter(this.doctype, fieldname, 'like', '%' + label);
} else {
this.filter_list.add_filter(fieldname, '=', label);
this.filter_list.add_filter(this.doctype, fieldname, '=', label);
}
}
this.run();