Merge pull request #967 from nextcloud/settings_users_js_defines

Fix some jshint errors in settings/users
This commit is contained in:
Roeland Jago Douma 2016-08-19 12:45:42 +02:00 committed by GitHub
commit b1299bb029
3 changed files with 12 additions and 5 deletions

View File

@ -17,6 +17,9 @@
* @param {removeCallback} removeCallback the function to be called after
* successful delete.
*/
/* globals escapeHTML */
function DeleteHandler(endpoint, paramID, markCallback, removeCallback) {
this.oidToDelete = false;
this.canceled = false;

View File

@ -5,6 +5,8 @@
* See the COPYING-README file.
*/
/* globals escapeHTML, UserList, DeleteHandler */
var $userGroupList,
$sortGroupBy;
@ -269,7 +271,7 @@ GroupList = {
},
initDeleteHandling: function () {
//set up handler
GroupDeleteHandler = new DeleteHandler('/settings/users/groups', 'groupname',
var GroupDeleteHandler = new DeleteHandler('/settings/users/groups', 'groupname',
GroupList.hide, GroupList.remove);
//configure undo

View File

@ -6,6 +6,8 @@
* See the COPYING-README file.
*/
/* globals escapeHTML, GroupList, DeleteHandler, UserManagementFilter */
var $userList;
var $userListBody;
@ -457,7 +459,7 @@ var UserList = {
if (user === OC.currentUser && group === 'admin') {
return false;
}
if (!oc_isadmin && checked.length === 1 && checked[0] === group) {
if (!OC.isUserAdmin() && checked.length === 1 && checked[0] === group) {
return false;
}
$.post(
@ -500,7 +502,7 @@ var UserList = {
GroupList.addGroup(escapeHTML(group));
};
var label;
if (oc_isadmin) {
if (OC.isUserAdmin()) {
label = t('settings', 'Add group');
}
else {
@ -839,8 +841,8 @@ $(document).ready(function () {
if(UserList.availableGroups.indexOf(gid) === -1) {
UserList.availableGroups.push(gid);
}
$li = GroupList.getGroupLI(gid);
userCount = GroupList.getUserCount($li);
var $li = GroupList.getGroupLI(gid);
var userCount = GroupList.getUserCount($li);
GroupList.setUserCount($li, userCount + 1);
}
}