From 30b24696c869891c2eb82d7661bd6207bd956062 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 4 Feb 2015 17:19:11 +0100 Subject: [PATCH] fix user loading --- settings/js/users/users.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 1a755ab7b2..7034972dd1 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -422,7 +422,7 @@ var UserList = { UserList.noMoreEntries = true; $userList.siblings('.loading').remove(); } - UserList.offset += loadedUsers; + UserList.offset += limit; }).always(function() { UserList.updating = false; }); @@ -866,6 +866,11 @@ $(document).ready(function () { 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; + } } // trigger loading of users on startup