summaryrefslogtreecommitdiffstats
path: root/core/js/sharedialogshareelistview.js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-19 10:04:37 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-21 15:02:20 +0200
commitc71d3dc9bf22a19745d5da40b261605fc337f44c (patch)
treeb0811231dc6e32fa5ca495689e9435a34dfe49fd /core/js/sharedialogshareelistview.js
parente951ad50340c19ecd669fba867b82f7c332a56df (diff)
downloadnextcloud-server-c71d3dc9bf22a19745d5da40b261605fc337f44c.tar.gz
nextcloud-server-c71d3dc9bf22a19745d5da40b261605fc337f44c.zip
Public share
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/js/sharedialogshareelistview.js')
-rw-r--r--core/js/sharedialogshareelistview.js18
1 files changed, 7 insertions, 11 deletions
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index 88f116e8301..cdf6972a940 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -34,8 +34,9 @@
'<label for="canEdit-{{cid}}-{{shareId}}">{{canEditLabel}}</label>' +
'</span>' +
'{{/if}}' +
- '<a href="#"><span class="icon icon-more"></span></a>' +
- '{{{popoverMenu}}}' +
+ '<div tabindex="0" class="share-menu"><span class="icon icon-more"></span>' +
+ '{{{popoverMenu}}}' +
+ '</div>' +
'</span>' +
'</li>' +
'{{/each}}' +
@@ -167,14 +168,12 @@
/** @type {boolean|number} **/
_renderPermissionChange: false,
- _noteView: undefined,
-
events: {
'click .unshare': 'onUnshare',
'click .share-add': 'showNoteForm',
'click .share-note-delete': 'deleteNote',
'click .share-note-submit': 'updateNote',
- 'click .icon-more': 'onToggleMenu',
+ 'click .share-menu .icon-more': 'onToggleMenu',
'click .permissions': 'onPermissionChange',
'click .expireDate' : 'onExpireDateChange',
'click .password' : 'onMailSharePasswordProtectChange',
@@ -196,8 +195,6 @@
this.model.on('change:shares', function() {
view.render();
});
-
- this._noteView = options.parent.noteView;
},
/**
@@ -498,10 +495,8 @@
showNoteForm(event) {
event.preventDefault();
event.stopPropagation();
- var self = this;
var $element = $(event.target);
var $li = $element.closest('li[data-share-id]');
- var shareId = $li.data('share-id');
var $menu = $element.closest('li');
var $form = $menu.next('li.share-note-form');
@@ -522,6 +517,9 @@
console.log($form.find('.share-note'));
$form.find('.share-note').val('');
+
+ $form.addClass('hidden');
+ $menu.find('.share-note-delete').hide();
self.sendNote('', shareId, $menu);
},
@@ -599,8 +597,6 @@
self.model.removeShare(shareId)
.done(function() {
$li.remove();
- // remove note field on sucess
- self._noteView.hide();
})
.fail(function() {
$loading.addClass('hidden');