From: Arthur Schiwon Date: Thu, 17 Apr 2014 19:40:28 +0000 (+0200) Subject: stick with current group when the filter is used X-Git-Tag: v7.0.0alpha2~144^2~33 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dea7f457823e5b1a18f4165ded98baa0815ae79e;p=nextcloud-server.git stick with current group when the filter is used --- diff --git a/settings/js/users/filter.js b/settings/js/users/filter.js index 3b04a8750cf..456c51376b9 100644 --- a/settings/js/users/filter.js +++ b/settings/js/users/filter.js @@ -59,7 +59,7 @@ UserManagementFilter.prototype.init = function() { */ UserManagementFilter.prototype.run = function() { this.userList.empty(); - this.userList.update(); + this.userList.update(GroupList.getCurrentGID()); this.groupList.empty(); this.groupList.update(); }; diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js index 4c555bd4c86..e62dfd9dff7 100644 --- a/settings/js/users/groups.js +++ b/settings/js/users/groups.js @@ -6,6 +6,8 @@ */ var GroupList = { + activeGID: '', + addGroup: function(gid, usercount) { var li = $('li[data-gid]').last().clone(); var ul = $('li[data-gid]').first().parent(); @@ -28,6 +30,10 @@ groupLiElement.find('span[class=usercount]').first().text(usercount); }, + getCurrentGID: function() { + return GroupList.activeGID; + }, + sortGroups: function(usercount) { var lis = $('li[data-gid]').filterAttr('data-usercount', usercount.toString()).get(); var ul = $(lis).first().parent(); @@ -135,6 +141,7 @@ }, showGroup: function (gid) { + GroupList.activeGID = gid; UserList.empty(); UserList.update(gid); $('#app-navigation li').removeClass('active');