summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-12-06 15:43:37 +0100
committerRobin Appelman <robin@icewind.nl>2016-12-06 15:43:37 +0100
commitab993ad486ac4e85725d841b3aec2edd39cab694 (patch)
treef441c2124f598d99fa81533be98113289ec0abfb /settings/js
parent4f6993a15e82d398cd254c92b15b22307456e63f (diff)
downloadnextcloud-server-ab993ad486ac4e85725d841b3aec2edd39cab694.tar.gz
nextcloud-server-ab993ad486ac4e85725d841b3aec2edd39cab694.zip
hide token configure menu when clicking outside it
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/authtoken_view.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js
index ea4c49f5c5c..a81e05cb3ed 100644
--- a/settings/js/authtoken_view.js
+++ b/settings/js/authtoken_view.js
@@ -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');