diff options
author | Robin Appelman <robin@icewind.nl> | 2017-05-06 16:22:25 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-05-06 16:22:25 +0200 |
commit | 4fa817039451982b2ff8d7f6267a2770af594ca4 (patch) | |
tree | 52e8d849a82d14982bd214c86b4ed6a5b433c8f7 /settings/js/users/users.js | |
parent | 59ee22101f228d9dec8c3930da0b12b0766a479a (diff) | |
download | nextcloud-server-4fa817039451982b2ff8d7f6267a2770af594ca4.tar.gz nextcloud-server-4fa817039451982b2ff8d7f6267a2770af594ca4.zip |
polish user actions dropdown
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'settings/js/users/users.js')
-rw-r--r-- | settings/js/users/users.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 387709cd64c..dccbcc0ce1e 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -908,21 +908,24 @@ $(document).ready(function () { event.stopPropagation(); var $td = $(this).closest('td'); var $tr = $($td).closest('tr'); - var menudiv = $td.find('.popovermenu'); + var menudiv = $tr.find('.popovermenu'); - if(menudiv.is(':visible')) { - menudiv.fadeOut(100); + if($tr.is('.active')) { + $tr.removeClass('active'); return; } + $('#userlist tr.active').removeClass('active'); menudiv.find('.action-togglestate').empty(); if($tr.data('userEnabled')) { $('.action-togglestate', $td).html('<span class="icon icon-close"></span><span>'+t('settings', 'Disable')+'</span>'); } else { $('.action-togglestate', $td).html('<span class="icon icon-add"></span><span>'+t('settings', 'Enable')+'</span>'); } - menudiv.click(function() { menudiv.fadeOut(100); }); - menudiv.hover('', function() { menudiv.fadeOut(100); }); - menudiv.fadeIn(100); + $tr.addClass('active'); + }); + + $(document.body).click(function() { + $('#userlist tr.active').removeClass('active'); }); $userListBody.on('click', '.action-togglestate', function (event) { |