]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix user loading
authorArthur Schiwon <blizzz@owncloud.com>
Wed, 4 Feb 2015 16:19:11 +0000 (17:19 +0100)
committerArthur Schiwon <blizzz@owncloud.com>
Wed, 4 Feb 2015 16:19:11 +0000 (17:19 +0100)
settings/js/users/users.js

index 1a755ab7b25e104d1dcbd26770ef48d27a4dfc00..7034972dd15526ed3cd3201e0c21297dbf3ddc74 100644 (file)
@@ -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