From 1ceaef9b0bc7132e7570fcd5301d5ae7b4c93dd2 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 11 Jul 2014 12:49:57 +0000 Subject: [PATCH] Changing group in admin needs to refresh nm group filter too --- admin/js/app.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/admin/js/app.js b/admin/js/app.js index e2f5d938f2..6cd3bf7b9a 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -156,16 +156,27 @@ app.classes.admin = AppJS.extend( if (_id < 0) { var tree = this.et2.getWidgetById('tree'); + var nm = this.et2.getWidgetById('nm'); switch(_type) { case 'delete': tree.deleteItem('/groups/'+_id, false); - return false; // --> no regular refresh + if (nm) nm.getInstanceManager().submit(); + break; default: // add, update, edit, null - tree.refreshItem('/groups'); - return false; // --> no regular refresh + if (nm) + { + var activeFilters = nm.activeFilters; + nm.getInstanceManager().submit(); + var nm = this.et2.getWidgetById('nm'); + nm.applyFilters(activeFilters); + } + } + var refreshTree = this.et2.getWidgetById('tree'); + if (refreshTree) refreshTree.refreshItem('/groups'); + return false; // --> no regular refresh } // not a user or group, eg. categories else if (!_id)