Skip to content

Commit fb8bae2

Browse files
committed
add rename action to link share menu
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
1 parent 3f4e189 commit fb8bae2

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

core/js/sharedialoglinkshareview.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@
8585
' <label for="sharingDialogAllowPublicEditing-{{cid}}">{{publicEditingLabel}}</label>' +
8686
' </span></li>' +
8787
'{{/if}}' +
88+
'<li>' +
89+
'<a href="#" class="share-rename-label"><span class="icon-loading-small hidden"></span>' +
90+
' <span class="icon icon-rename"></span>' +
91+
' <span>{{addRenameLabel}}</span>' +
92+
'</a>' +
93+
'</li>' +
8894
'{{#if showPasswordCheckBox}}' +
8995
' <li><span class="shareOption menuitem">' +
9096
' <input type="checkbox" name="showPassword" id="showPassword-{{cid}}" class="checkbox showPasswordCheckbox"' +
@@ -406,7 +412,7 @@
406412
permissions: permissions
407413
});
408414
},
409-
415+
410416
showNoteForm: function(event) {
411417
event.preventDefault();
412418
event.stopPropagation();
@@ -431,9 +437,9 @@
431437
var shareId = $li.data('share-id');
432438
var $menu = $element.closest('li');
433439
var $form = $menu.next('li.share-note-form');
434-
440+
435441
$form.find('.share-note').val('');
436-
442+
437443
$form.addClass('hidden');
438444
$menu.find('.share-note-delete').hide();
439445

@@ -636,6 +642,7 @@
636642
defaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today
637643
shareNote: this.model.get('linkShare').note,
638644
addNoteLabel: t('core', 'Note to recipient'),
645+
addRenameLabel: t('core', 'Rename'),
639646
});
640647

641648
var pendingPopover = this.pendingPopoverMenuTemplate({
@@ -745,7 +752,7 @@
745752
var datePicker = $(expirationDatePicker);
746753
var state = $element.prop('checked');
747754
datePicker.toggleClass('hidden', !state);
748-
755+
749756
if (!state) {
750757
// disabled, let's hide the input and
751758
// set the expireDate to nothing

0 commit comments

Comments
 (0)