Merge pull request #967 from nextcloud/settings_users_js_defines
Fix some jshint errors in settings/users
This commit is contained in:
commit
b1299bb029
|
@ -17,6 +17,9 @@
|
||||||
* @param {removeCallback} removeCallback the function to be called after
|
* @param {removeCallback} removeCallback the function to be called after
|
||||||
* successful delete.
|
* successful delete.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* globals escapeHTML */
|
||||||
|
|
||||||
function DeleteHandler(endpoint, paramID, markCallback, removeCallback) {
|
function DeleteHandler(endpoint, paramID, markCallback, removeCallback) {
|
||||||
this.oidToDelete = false;
|
this.oidToDelete = false;
|
||||||
this.canceled = false;
|
this.canceled = false;
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
* See the COPYING-README file.
|
* See the COPYING-README file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* globals escapeHTML, UserList, DeleteHandler */
|
||||||
|
|
||||||
var $userGroupList,
|
var $userGroupList,
|
||||||
$sortGroupBy;
|
$sortGroupBy;
|
||||||
|
|
||||||
|
@ -269,7 +271,7 @@ GroupList = {
|
||||||
},
|
},
|
||||||
initDeleteHandling: function () {
|
initDeleteHandling: function () {
|
||||||
//set up handler
|
//set up handler
|
||||||
GroupDeleteHandler = new DeleteHandler('/settings/users/groups', 'groupname',
|
var GroupDeleteHandler = new DeleteHandler('/settings/users/groups', 'groupname',
|
||||||
GroupList.hide, GroupList.remove);
|
GroupList.hide, GroupList.remove);
|
||||||
|
|
||||||
//configure undo
|
//configure undo
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
* See the COPYING-README file.
|
* See the COPYING-README file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* globals escapeHTML, GroupList, DeleteHandler, UserManagementFilter */
|
||||||
|
|
||||||
var $userList;
|
var $userList;
|
||||||
var $userListBody;
|
var $userListBody;
|
||||||
|
|
||||||
|
@ -457,7 +459,7 @@ var UserList = {
|
||||||
if (user === OC.currentUser && group === 'admin') {
|
if (user === OC.currentUser && group === 'admin') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!oc_isadmin && checked.length === 1 && checked[0] === group) {
|
if (!OC.isUserAdmin() && checked.length === 1 && checked[0] === group) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.post(
|
$.post(
|
||||||
|
@ -500,7 +502,7 @@ var UserList = {
|
||||||
GroupList.addGroup(escapeHTML(group));
|
GroupList.addGroup(escapeHTML(group));
|
||||||
};
|
};
|
||||||
var label;
|
var label;
|
||||||
if (oc_isadmin) {
|
if (OC.isUserAdmin()) {
|
||||||
label = t('settings', 'Add group');
|
label = t('settings', 'Add group');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -839,8 +841,8 @@ $(document).ready(function () {
|
||||||
if(UserList.availableGroups.indexOf(gid) === -1) {
|
if(UserList.availableGroups.indexOf(gid) === -1) {
|
||||||
UserList.availableGroups.push(gid);
|
UserList.availableGroups.push(gid);
|
||||||
}
|
}
|
||||||
$li = GroupList.getGroupLI(gid);
|
var $li = GroupList.getGroupLI(gid);
|
||||||
userCount = GroupList.getUserCount($li);
|
var userCount = GroupList.getUserCount($li);
|
||||||
GroupList.setUserCount($li, userCount + 1);
|
GroupList.setUserCount($li, userCount + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue