Parcourir la source

hide token configure menu when clicking outside it

Signed-off-by: Robin Appelman <robin@icewind.nl>
tags/v11.0RC2
Robin Appelman il y a 7 ans
Parent
révision
ab993ad486
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. 10
    1
      settings/js/authtoken_view.js

+ 10
- 1
settings/js/authtoken_view.js Voir le fichier

@@ -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');

Chargement…
Annuler
Enregistrer