From 957fa092c5f88fb42e3919992ff498d36e1317e8 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 10 Jan 2013 14:28:13 +0530 Subject: [PATCH] double run fix --- public/js/wn/views/doclistview.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/public/js/wn/views/doclistview.js b/public/js/wn/views/doclistview.js index b6ee6fa0c0..726f1e0efe 100644 --- a/public/js/wn/views/doclistview.js +++ b/public/js/wn/views/doclistview.js @@ -151,8 +151,8 @@ wn.views.DocListView = wn.ui.Listing.extend({ var me = this; if(route[2]) { $.each(wn.utils.get_args_dict_from_url(route[2]), function(key, val) { - me.set_filter(key, val); - }) + me.set_filter(key, val, true); + }); } this._super(arg0, arg1); }, @@ -336,7 +336,7 @@ wn.views.DocListView = wn.ui.Listing.extend({ return false; }); }, - set_filter: function(fieldname, label) { + set_filter: function(fieldname, label, no_run) { var filter = this.filter_list.get_filter(fieldname); if(filter) { var v = cstr(filter.field.get_value()); @@ -362,6 +362,7 @@ wn.views.DocListView = wn.ui.Listing.extend({ this.filter_list.add_filter(this.doctype, fieldname, '=', label); } } - this.run(); + if(!no_run) + this.run(); } }); \ No newline at end of file