]> source.dussan.org Git - nextcloud-server.git/commitdiff
open popup menu in share dialog only for one sharee on render 2363/head
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 28 Nov 2016 09:56:22 +0000 (10:56 +0100)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 28 Nov 2016 09:56:22 +0000 (10:56 +0100)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
core/js/sharedialogshareelistview.js

index 96bbf94fa1cb17710e8e1d261367138c185103dc..c6f2a9c5c05ed2e9a1d29cda93caa8737f4d737f 100644 (file)
                        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();
                        var $menu = $li.find('.popovermenu');
 
                        OC.showMenu(null, $menu);
-                       this._menuOpen = true;
+                       this._menuOpen = $li.data('share-id');
                },
 
                onPermissionChange: function(event) {