summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-02-25 16:11:20 +0100
committerArthur Schiwon <blizzz@owncloud.com>2014-06-02 12:53:54 +0200
commitcfba7e20cf1395ec3044b5ed8368536f2155b1fa (patch)
tree270adb43cd3577cd59b87066743ccce5599c9c1b /settings
parent853ced644d6984ffa7260015851646717855a6c6 (diff)
downloadnextcloud-server-cfba7e20cf1395ec3044b5ed8368536f2155b1fa.tar.gz
nextcloud-server-cfba7e20cf1395ec3044b5ed8368536f2155b1fa.zip
don't hide add group when text is entered (except for ESC press)
Diffstat (limited to 'settings')
-rw-r--r--settings/js/users/groups.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js
index 9f8225294b9..e5d83b03775 100644
--- a/settings/js/users/groups.js
+++ b/settings/js/users/groups.js
@@ -79,6 +79,14 @@
&& $('#newgroup-form').find($(el)).length === 0);
},
+ hasAddGroupNameText: function() {
+ name = $('#newgroupname').val();
+ if($.trim(name) === '') {
+ return false;
+ }
+ return true;
+ },
+
showGroup: function (gid) {
UserList.empty();
UserList.update(gid);
@@ -160,7 +168,8 @@ $(document).ready( function () {
$(document).on('click keydown keyup', function(event) {
if(!GroupList.isAddGroupButtonVisible()
- && !GroupList.elementBelongsToAddGroup(event.target)) {
+ && !GroupList.elementBelongsToAddGroup(event.target)
+ && !GroupList.hasAddGroupNameText()) {
GroupList.toggleAddGroup();
}
// Escape