aboutsummaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2017-10-23 17:51:03 +0200
committerGitHub <noreply@github.com>2017-10-23 17:51:03 +0200
commite5b619d0a673d287ccf542651b33561ec5ac5cc4 (patch)
tree2e6bec22e358036a8dbbc42fead3b895188cd4a8 /settings/js
parent14a37d35120e8fbe79632f38ce3593cae01ee73c (diff)
parent2e38d0173dae6dda76db6206a00f73cfc512d710 (diff)
downloadnextcloud-server-e5b619d0a673d287ccf542651b33561ec5ac5cc4.tar.gz
nextcloud-server-e5b619d0a673d287ccf542651b33561ec5ac5cc4.zip
Merge pull request #6848 from nextcloud/user-app-nav-to-css-guidelines
User settings app-navigation to css guidelines
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/users/groups.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js
index 073551c0d8e..522291a00d7 100644
--- a/settings/js/users/groups.js
+++ b/settings/js/users/groups.js
@@ -227,7 +227,7 @@ GroupList = {
},
isAddGroupButtonVisible: function () {
- return $('#newgroup-init').is(":visible");
+ return !$('#newgroup-entry').hasClass('editing');
},
toggleAddGroup: function (event) {
@@ -235,14 +235,12 @@ GroupList = {
if (event) {
event.stopPropagation();
}
- $('#newgroup-form').show();
- $('#newgroup-init').hide();
- $('#newgroupname').focus();
+ $('#newgroup-entry').addClass('editing');
+ $('#newgroupname').select();
GroupList.handleAddGroupInput('');
}
else {
- $('#newgroup-form').hide();
- $('#newgroup-init').show();
+ $('#newgroup-entry').removeClass('editing');
$('#newgroupname').val('');
}
},
@@ -299,7 +297,7 @@ GroupList = {
}
// Call function for handling delete/undo
- GroupDeleteHandler.mark(GroupList.getElementGID(this));
+ GroupDeleteHandler.mark(GroupList.getElementGID($(this).parent()));
};
$userGroupList.on('click', '.delete', deleteAction);
@@ -340,7 +338,6 @@ $(document).ready( function () {
}
// Display or hide of Create Group List Element
- $('#newgroup-form').hide();
$('#newgroup-init').on('click', function (e) {
GroupList.toggleAddGroup(e);
});