Skip to content

Commit

Permalink
Merge pull request #2532 from nextcloud/token-dropdown
Browse files Browse the repository at this point in the history
Fix apppassword dropdown issues
  • Loading branch information
schiessle authored Dec 6, 2016
2 parents b190153 + ab993ad commit 0b0f273
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions settings/css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ table.nostyle td { padding: 0.2em 0; }
padding: 10px;
}

#sessions .token-list div.configure:after,
#apppasswords .token-list div.configure:after {
right: 13px;
}

#sessions .token-list tr.active div.configure > *,
#apppasswords .token-list tr.active div.configure > *{
margin-top: 5px;
Expand Down
10 changes: 10 additions & 0 deletions settings/js/authtoken_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -355,12 +359,18 @@
},

_onConfigureToken: function (event) {
event.stopPropagation();
this._hideConfigureToken();
var $target = $(event.target);
var $row = $target.closest('tr');
$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');
Expand Down

0 comments on commit 0b0f273

Please sign in to comment.