summaryrefslogtreecommitdiffstats
path: root/settings/js/users/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'settings/js/users/users.js')
-rw-r--r--settings/js/users/users.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 2a4baa0e5bf..512f147364f 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -255,6 +255,10 @@ var UserList = {
}
},
doSort: function() {
+ // some browsers like Chrome lose the scrolling information
+ // when messing with the list elements
+ var lastScrollTop = this.scrollArea.scrollTop();
+ var lastScrollLeft = this.scrollArea.scrollLeft();
var rows = $userListBody.find('tr').get();
rows.sort(function(a, b) {
@@ -280,6 +284,8 @@ var UserList = {
if(items.length > 0) {
$userListBody.append(items);
}
+ this.scrollArea.scrollTop(lastScrollTop);
+ this.scrollArea.scrollLeft(lastScrollLeft);
},
checkUsersToLoad: function() {
//30 shall be loaded initially, from then on always 10 upon scrolling
@@ -609,10 +615,11 @@ $(document).ready(function () {
// Implements User Search
OCA.Search.users= new UserManagementFilter(UserList, GroupList);
+ UserList.scrollArea = $('#app-content');
+
UserList.doSort();
UserList.availableGroups = $userList.data('groups');
- UserList.scrollArea = $('#app-content');
UserList.scrollArea.scroll(function(e) {UserList._onScroll(e);});
$userList.after($('<div class="loading" style="height: 200px; visibility: hidden;"></div>'));