don't hide add group when text is entered (except for ESC press)
This commit is contained in:
parent
853ced644d
commit
cfba7e20cf
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue