diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2016-07-28 10:46:00 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2016-10-03 09:06:51 +0200 |
commit | 7533fcb977f6153065ad99b9c9e046c4e744f84e (patch) | |
tree | fce19f4f3307226ee4587f563e95b7e9769f32dd /core | |
parent | 1181ac14f7cad23bb49ed749bfa60f40d57a977f (diff) | |
download | nextcloud-server-7533fcb977f6153065ad99b9c9e046c4e744f84e.tar.gz nextcloud-server-7533fcb977f6153065ad99b9c9e046c4e744f84e.zip |
move unshare button out of popover menu; keep menu opened on re-render
Diffstat (limited to 'core')
-rw-r--r-- | core/css/share.css | 1 | ||||
-rw-r--r-- | core/js/sharedialogshareelistview.js | 23 |
2 files changed, 15 insertions, 9 deletions
diff --git a/core/css/share.css b/core/css/share.css index 0da3aa5359d..7d11cbff381 100644 --- a/core/css/share.css +++ b/core/css/share.css @@ -105,7 +105,6 @@ a.showCruds { a.unshare { display:inline; - float:right; opacity:.5; padding: 10px; margin-top: -5px; diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index 04cd64603d9..7caefcca30d 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -75,14 +75,9 @@ '</li>' + '{{/if}}' + '{{/if}}' + - '<li>' + - '<a href="#" class="menuitem action action-delete permanent unshare">' + - '<span class="icon icon-delete"></span>' + - '<span>{{unshareLabel}}</span>' + - '</a>' + - '</li>' + '</ul>' + '</div>' + + '<a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span class="hidden-visually">{{unshareLabel}}</span></a>' + '</span>' + '</li>' + '{{/each}}' + @@ -108,6 +103,8 @@ /** @type {Function} **/ _template: undefined, + _menuOpen: false, + events: { 'click .unshare': 'onUnshare', 'click .icon-more': 'onToggleMenu', @@ -210,7 +207,7 @@ })); if(this.configModel.areAvatarsEnabled()) { - this.$el.find('.avatar').each(function() { + this.$('.avatar').each(function() { var $this = $(this); if ($this.hasClass('imageplaceholderseed')) { $this.css({width: 32, height: 32}); @@ -221,10 +218,19 @@ }); } - this.$el.find('.has-tooltip').tooltip({ + this.$('.has-tooltip').tooltip({ placement: 'bottom' }); + var _this = this; + this.$('.popovermenu').on('afterHide', function() { + _this._menuOpen = false; + }); + if (this._menuOpen) { + // Open menu again if it was opened before + OC.showMenu(null, this.$('.popovermenu')); + } + this.delegateEvents(); return this; @@ -280,6 +286,7 @@ var $menu = $li.find('.popovermenu'); OC.showMenu(null, $menu); + this._menuOpen = true; }, onPermissionChange: function(event) { |