From 6cade9a5b7780c4bdd18899fb2ee1d5c1941d290 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 16 Aug 2012 16:05:50 +0530 Subject: [PATCH] fixes due to changes in filter logic --- js/wn/ui/search.js | 2 +- js/wn/views/doclistview.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/wn/ui/search.js b/js/wn/ui/search.js index 594fb2819e..c3c11aaf0e 100644 --- a/js/wn/ui/search.js +++ b/js/wn/ui/search.js @@ -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(); } }) \ No newline at end of file diff --git a/js/wn/views/doclistview.js b/js/wn/views/doclistview.js index 983e60e744..0823f91680 100644 --- a/js/wn/views/doclistview.js +++ b/js/wn/views/doclistview.js @@ -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();