]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix some jshint errors in settings/users 967/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 19 Aug 2016 08:46:42 +0000 (10:46 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 19 Aug 2016 08:46:42 +0000 (10:46 +0200)
settings/js/users/deleteHandler.js
settings/js/users/groups.js
settings/js/users/users.js

index a66e8b07a72892758086511990908f24883f747c..4f8d6eea9a78e2c35a5e192ec465eaa5005e876a 100644 (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;
index 36ebbd2fa6e3dbf1a3e59c920f0d398face9725f..e83f00970c2e7cf000937ad9a5836be746a45594 100644 (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
index 46c67fb83133fa689ca8ae2ff5aebfe1c32e6eb3..6be7b2d9526446f70ca4f0cde7a7a79646b3f22d 100644 (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);
                                                }
                                        }