Merge pull request #2532 from nextcloud/token-dropdown

Fix apppassword dropdown issues
This commit is contained in:
Björn Schießle 2016-12-06 17:10:00 +01:00 committed by GitHub
commit 0b0f27358f
2 changed files with 15 additions and 0 deletions

View File

@ -263,6 +263,11 @@ table.nostyle td { padding: 0.2em 0; }
padding: 10px; padding: 10px;
} }
#sessions .token-list div.configure:after,
#apppasswords .token-list div.configure:after {
right: 13px;
}
#sessions .token-list tr.active div.configure > *, #sessions .token-list tr.active div.configure > *,
#apppasswords .token-list tr.active div.configure > *{ #apppasswords .token-list tr.active div.configure > *{
margin-top: 5px; margin-top: 5px;

View File

@ -217,6 +217,10 @@
})); }));
var $el = $(el); 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', 'a.icon-delete', _.bind(_this._onDeleteToken, _this));
$el.on('click', '.icon-more', _.bind(_this._onConfigureToken, _this)); $el.on('click', '.icon-more', _.bind(_this._onConfigureToken, _this));
$el.on('change', 'input.filesystem', _.bind(_this._onSetTokenScope, _this)); $el.on('change', 'input.filesystem', _.bind(_this._onSetTokenScope, _this));
@ -355,12 +359,18 @@
}, },
_onConfigureToken: function (event) { _onConfigureToken: function (event) {
event.stopPropagation();
this._hideConfigureToken();
var $target = $(event.target); var $target = $(event.target);
var $row = $target.closest('tr'); var $row = $target.closest('tr');
$row.toggleClass('active'); $row.toggleClass('active');
var id = $row.data('id'); var id = $row.data('id');
}, },
_hideConfigureToken: function() {
$('.token-list tr').removeClass('active');
},
_onDeleteToken: function (event) { _onDeleteToken: function (event) {
var $target = $(event.target); var $target = $(event.target);
var $row = $target.closest('tr'); var $row = $target.closest('tr');