summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-12-12 10:21:50 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-12-12 14:19:29 +0100
commit04aaa728103c5ff184a89e8b69bca3f196c52224 (patch)
tree5b2cfabb736379ddaa652ad19c4f364550423a76 /settings/js
parent6b4502adebf1d756707e8fb5b8ab697c1c746e6b (diff)
downloadnextcloud-server-04aaa728103c5ff184a89e8b69bca3f196c52224.tar.gz
nextcloud-server-04aaa728103c5ff184a89e8b69bca3f196c52224.zip
Show user backend in user management
* add switch to settings to show user backend * user classes for headers and rows to unify the show/hide statement * add user backend to response of user create request * proper markup in settings area
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/users/users.js31
1 files changed, 20 insertions, 11 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 70dd115396d..62e18d1be04 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -28,7 +28,7 @@ var UserList = {
this.$el.find('.quota-user').singleSelect().on('change', this.onQuotaSelect);
},
- add: function (username, displayname, groups, subadmin, quota, storageLocation, lastLogin, sort) {
+ add: function (username, displayname, groups, subadmin, quota, storageLocation, lastLogin, sort, backend) {
var $tr = $userListBody.find('tr:first-child').clone();
// this removes just the `display:none` of the template row
$tr.removeAttr('style');
@@ -117,6 +117,11 @@ var UserList = {
$tr.find('td.storageLocation').text(storageLocation);
/**
+ * user backend
+ */
+ $tr.find('td.userBackend').text(backend);
+
+ /**
* last login
*/
var lastLoginRel = t('settings', 'never');
@@ -372,7 +377,7 @@ var UserList = {
if(UserList.has(user.name)) {
return true;
}
- var $tr = UserList.add(user.name, user.displayname, user.groups, user.subadmin, user.quota, user.storageLocation, user.lastLogin, false);
+ var $tr = UserList.add(user.name, user.displayname, user.groups, user.subadmin, user.quota, user.storageLocation, user.lastLogin, false, user.backend);
$tr.addClass('appear transparent');
trs.push($tr);
loadedUsers++;
@@ -731,7 +736,7 @@ $(document).ready(function () {
}, 10000);
}
if(!UserList.has(username)) {
- UserList.add(username, username, result.groups, null, 'default', result.storageLocation, 0, true);
+ UserList.add(username, username, result.groups, null, 'default', result.storageLocation, 0, true, result.backend);
}
$('#newusername').focus();
GroupList.incEveryoneCount();
@@ -743,21 +748,25 @@ $(document).ready(function () {
// Option to display/hide the "Storage location" column
$('#CheckboxStorageLocation').click(function() {
if ($('#CheckboxStorageLocation').is(':checked')) {
- $("#headerStorageLocation").show();
- $("#userlist td.storageLocation").show();
+ $("#userlist .storageLocation").show();
} else {
- $("#headerStorageLocation").hide();
- $("#userlist td.storageLocation").hide();
+ $("#userlist .storageLocation").hide();
}
});
// Option to display/hide the "Last Login" column
$('#CheckboxLastLogin').click(function() {
if ($('#CheckboxLastLogin').is(':checked')) {
- $("#headerLastLogin").show();
- $("#userlist td.lastLogin").show();
+ $("#userlist .lastLogin").show();
+ } else {
+ $("#userlist .lastLogin").hide();
+ }
+ });
+ // Option to display/hide the "Last Login" column
+ $('#CheckboxUserBackend').click(function() {
+ if ($('#CheckboxUserBackend').is(':checked')) {
+ $("#userlist .userBackend").show();
} else {
- $("#headerLastLogin").hide();
- $("#userlist td.lastLogin").hide();
+ $("#userlist .userBackend").hide();
}
});