* @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;
* See the COPYING-README file.
*/
+/* globals escapeHTML, UserList, DeleteHandler */
+
var $userGroupList,
$sortGroupBy;
},
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
* See the COPYING-README file.
*/
+/* globals escapeHTML, GroupList, DeleteHandler, UserManagementFilter */
+
var $userList;
var $userListBody;
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(
GroupList.addGroup(escapeHTML(group));
};
var label;
- if (oc_isadmin) {
+ if (OC.isUserAdmin()) {
label = t('settings', 'Add group');
}
else {
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);
}
}