summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2016-11-28 10:56:22 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-11-28 10:56:22 +0100
commit1965617a2fd98b849ebb5deaad0ad0caf6f58c0a (patch)
treeb4ff3432dda356079ffce2306668b9130c5f7890
parent1887fd32f1f2b265d603882849ae0605ebc62502 (diff)
downloadnextcloud-server-1965617a2fd98b849ebb5deaad0ad0caf6f58c0a.tar.gz
nextcloud-server-1965617a2fd98b849ebb5deaad0ad0caf6f58c0a.zip
open popup menu in share dialog only for one sharee on render
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r--core/js/sharedialogshareelistview.js10
1 files 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) {