summaryrefslogtreecommitdiffstats
path: root/settings/js/users
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-12-11 15:37:56 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-12-12 09:12:30 +0100
commitaf1f34e813eb3d7f19ba23a8a930c51bc610d0e9 (patch)
tree0848795d6a51f0f5a5828bb40a0fb47451c7d0d0 /settings/js/users
parent8fd90e04b62c10a48ac15a3a52f7cd6b4040359d (diff)
downloadnextcloud-server-af1f34e813eb3d7f19ba23a8a930c51bc610d0e9.tar.gz
nextcloud-server-af1f34e813eb3d7f19ba23a8a930c51bc610d0e9.zip
remove PHP generated user list and move all to the existing JS part
Diffstat (limited to 'settings/js/users')
-rw-r--r--settings/js/users/users.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 9c48da32c5a..5eee36f0f9e 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -12,9 +12,7 @@ var filter;
var UserList = {
availableGroups: [],
- offset: 30, //The first 30 users are there. No prob, if less in total.
- //hardcoded in settings/users.php
-
+ offset: 0,
usersToLoad: 10, //So many users will be loaded when user scrolls down
currentGid: '',
@@ -32,13 +30,23 @@ var UserList = {
add: function (username, displayname, groups, subadmin, quota, storageLocation, lastLogin, sort) {
var $tr = $userListBody.find('tr:first-child').clone();
+ // this removes just the `display:none` of the template row
+ $tr.removeAttr('style');
var subAdminsEl;
var subAdminSelect;
var groupsSelect;
+
+ /**
+ * Avatar or placeholder
+ */
if ($tr.find('div.avatardiv').length){
$tr.find('.avatardiv').imageplaceholder(username, displayname);
$('div.avatardiv', $tr).avatar(username, 32);
}
+
+ /**
+ * add username and displayname to row (in data and visible markup
+ */
$tr.data('uid', username);
$tr.data('displayname', displayname);
$tr.find('td.name').text(username);
@@ -727,6 +735,7 @@ $(document).ready(function () {
}
});
-
+ // trigger loading of users on startup
+ UserList.update(UserList.currentGid);
});