mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
hide token configure menu when clicking outside it
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
4f6993a15e
commit
ab993ad486
1 changed files with 10 additions and 1 deletions
|
|
@ -217,6 +217,10 @@
|
|||
}));
|
||||
|
||||
var $el = $(el);
|
||||
$('body').on('click', _.bind(_this._hideConfigureToken, _this));
|
||||
$el.on('click', '.popovermenu', function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
$el.on('click', 'a.icon-delete', _.bind(_this._onDeleteToken, _this));
|
||||
$el.on('click', '.icon-more', _.bind(_this._onConfigureToken, _this));
|
||||
$el.on('change', 'input.filesystem', _.bind(_this._onSetTokenScope, _this));
|
||||
|
|
@ -355,13 +359,18 @@
|
|||
},
|
||||
|
||||
_onConfigureToken: function (event) {
|
||||
event.stopPropagation();
|
||||
this._hideConfigureToken();
|
||||
var $target = $(event.target);
|
||||
var $row = $target.closest('tr');
|
||||
$('.token-list tr').removeClass('active');
|
||||
$row.toggleClass('active');
|
||||
var id = $row.data('id');
|
||||
},
|
||||
|
||||
_hideConfigureToken: function() {
|
||||
$('.token-list tr').removeClass('active');
|
||||
},
|
||||
|
||||
_onDeleteToken: function (event) {
|
||||
var $target = $(event.target);
|
||||
var $row = $target.closest('tr');
|
||||
|
|
|
|||
Loading…
Reference in a new issue