aboutsummaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-04-02 21:55:57 +0200
committerArthur Schiwon <blizzz@owncloud.com>2014-06-02 12:53:55 +0200
commit68dc665c65d5cac1b3b99831d011819570ecf62a (patch)
tree0d5aed97424ccf059825ee9bcea949e1aa3d7ced /settings/js
parent5b8ba79356c50934b949a9e2a1942aeddd7640ff (diff)
downloadnextcloud-server-68dc665c65d5cac1b3b99831d011819570ecf62a.tar.gz
nextcloud-server-68dc665c65d5cac1b3b99831d011819570ecf62a.zip
dynamically decide whether to load 10 or 30 users
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/users/users.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 92ce8277baf..481cf1586ce 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -88,6 +88,7 @@ var UserList = {
tr.show();
$('tbody tr').first().remove();
UserList.isEmpty = false;
+ UserList.checkUsersToLoad();
}
if (sort) {
UserList.doSort();
@@ -164,6 +165,14 @@ var UserList = {
$('tbody').append(items);
}
},
+ checkUsersToLoad: function() {
+ //30 shall be loaded initially, from then on always 10 upon scrolling
+ if(UserList.isEmpty === false) {
+ UserList.usersToLoad = 10;
+ } else {
+ UserList.usersToLoad = 30;
+ }
+ },
empty: function() {
//one row needs to be kept, because it is cloned to add new rows
$('tbody tr:not(:first)').remove();
@@ -174,6 +183,7 @@ var UserList = {
tr.attr('data-uid', Math.random().toString(36).substring(2));
UserList.isEmpty = true;
UserList.offset = 0;
+ UserList.checkUsersToLoad();
},
hide: function(uid) {
$('tr[data-uid="' + uid + '"]').hide();