summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2015-10-28 11:18:10 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2015-10-28 11:55:16 +0100
commit69417e3654902066ab270dcc088ef17c676459b3 (patch)
tree98f8d1f25ae36168f334d6c11f6ca739ca6cc084 /settings
parent0eeee8fdd8cb6dbbd019575cd290c81b18877c7f (diff)
downloadnextcloud-server-69417e3654902066ab270dcc088ef17c676459b3.tar.gz
nextcloud-server-69417e3654902066ab270dcc088ef17c676459b3.zip
Initially load at least 250 users
Diffstat (limited to 'settings')
-rw-r--r--settings/js/users/users.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index a99b46448be..bc8a6a9273e 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -14,6 +14,7 @@ var UserList = {
availableGroups: [],
offset: 0,
usersToLoad: 10, //So many users will be loaded when user scrolls down
+ initialUsersToLoad: 250, //initial number of users to load
currentGid: '',
filter: '',
@@ -286,7 +287,7 @@ var UserList = {
if(UserList.isEmpty === false) {
UserList.usersToLoad = 10;
} else {
- UserList.usersToLoad = 30;
+ UserList.usersToLoad = UserList.initialUsersToLoad;
}
},
empty: function() {
@@ -900,16 +901,20 @@ $(document).ready(function () {
});
// calculate initial limit of users to load
- var initialUserCountLimit = 20,
+ var initialUserCountLimit = UserList.initialUsersToLoad,
containerHeight = $('#app-content').height();
if(containerHeight > 40) {
initialUserCountLimit = Math.floor(containerHeight/40);
- while((initialUserCountLimit % UserList.usersToLoad) !== 0) {
- // must be a multiple of this, otherwise LDAP freaks out.
- // FIXME: solve this in LDAP backend in 8.1
- initialUserCountLimit = initialUserCountLimit + 1;
+ if (initialUserCountLimit < UserList.initialUsersToLoad) {
+ initialUserCountLimit = UserList.initialUsersToLoad;
}
}
+ //realign initialUserCountLimit with usersToLoad as a safeguard
+ while((initialUserCountLimit % UserList.usersToLoad) !== 0) {
+ // must be a multiple of this, otherwise LDAP freaks out.
+ // FIXME: solve this in LDAP backend in 8.1
+ initialUserCountLimit = initialUserCountLimit + 1;
+ }
// trigger loading of users on startup
UserList.update(UserList.currentGid, initialUserCountLimit);