From 1965617a2fd98b849ebb5deaad0ad0caf6f58c0a Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Mon, 28 Nov 2016 10:56:22 +0100 Subject: [PATCH] open popup menu in share dialog only for one sharee on render Signed-off-by: Arthur Schiwon --- core/js/sharedialogshareelistview.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index 96bbf94fa1c..c6f2a9c5c05 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -284,9 +284,13 @@ this.$('.popovermenu').on('afterHide', function() { _this._menuOpen = false; }); - if (this._menuOpen) { + if (this._menuOpen != false) { // Open menu again if it was opened before - OC.showMenu(null, this.$('.popovermenu')); + var shareId = parseInt(this._menuOpen, 10); + if(!_.isNaN(shareId)) { + var liSelector = 'li[data-share-id=' + shareId + ']'; + OC.showMenu(null, this.$(liSelector + ' .popovermenu')); + } } this.delegateEvents(); @@ -344,7 +348,7 @@ var $menu = $li.find('.popovermenu'); OC.showMenu(null, $menu); - this._menuOpen = true; + this._menuOpen = $li.data('share-id'); }, onPermissionChange: function(event) { -- 2.39.5