move unshare button out of popover menu; keep menu opened on re-render
This commit is contained in:
parent
1181ac14f7
commit
7533fcb977
2 changed files with 15 additions and 9 deletions
|
@ -105,7 +105,6 @@ a.showCruds {
|
|||
|
||||
a.unshare {
|
||||
display:inline;
|
||||
float:right;
|
||||
opacity:.5;
|
||||
padding: 10px;
|
||||
margin-top: -5px;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue