|
|
|
|
@ -27,7 +27,7 @@ |
|
|
|
|
'<div class="oneline">' + |
|
|
|
|
'<label for="linkText-{{cid}}" class="hidden-visually">{{urlLabel}}</label>' + |
|
|
|
|
'<input id="linkText-{{cid}}" class="linkText {{#unless isLinkShare}}hidden{{/unless}}" type="text" readonly="readonly" value="{{shareLinkURL}}" />' + |
|
|
|
|
'<a class="{{#unless isLinkShare}}hidden-visually{{/unless}} clipboardButton icon icon-clippy hasTooltip" title="{{copy}}" data-clipboard-target="#linkText-{{cid}}"></a>' + |
|
|
|
|
'<a class="{{#unless isLinkShare}}hidden-visually{{/unless}} clipboardButton icon icon-clippy" data-clipboard-target="#linkText-{{cid}}"></a>' + |
|
|
|
|
'</div>' + |
|
|
|
|
' {{#if publicUpload}}' + |
|
|
|
|
'<div id="allowPublicUploadWrapper">' + |
|
|
|
|
@ -134,10 +134,15 @@ |
|
|
|
|
var clipboard = new Clipboard('.clipboardButton'); |
|
|
|
|
clipboard.on('success', function(e) { |
|
|
|
|
var $input = $(e.trigger); |
|
|
|
|
$input.tooltip({placement: 'bottom', trigger: 'manual', title: t('core', 'Copied!')}); |
|
|
|
|
$input.tooltip('show'); |
|
|
|
|
$input.tooltip('hide') |
|
|
|
|
.attr('data-original-title', t('core', 'Copied!')) |
|
|
|
|
.tooltip('fixTitle') |
|
|
|
|
.tooltip({placement: 'bottom', trigger: 'manual'}) |
|
|
|
|
.tooltip('show'); |
|
|
|
|
_.delay(function() { |
|
|
|
|
$input.tooltip('hide'); |
|
|
|
|
$input.tooltip('hide') |
|
|
|
|
.attr('data-original-title', t('core', 'Copy')) |
|
|
|
|
.tooltip('fixTitle'); |
|
|
|
|
}, 3000); |
|
|
|
|
}); |
|
|
|
|
clipboard.on('error', function (e) { |
|
|
|
|
@ -151,14 +156,15 @@ |
|
|
|
|
actionMsg = t('core', 'Press Ctrl-C to copy.'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$input.tooltip({ |
|
|
|
|
placement: 'bottom', |
|
|
|
|
trigger: 'manual', |
|
|
|
|
title: actionMsg |
|
|
|
|
}); |
|
|
|
|
$input.tooltip('show'); |
|
|
|
|
$input.tooltip('hide') |
|
|
|
|
.attr('data-original-title', actionMsg) |
|
|
|
|
.tooltip('fixTitle') |
|
|
|
|
.tooltip({placement: 'bottom', trigger: 'manual'}) |
|
|
|
|
.tooltip('show'); |
|
|
|
|
_.delay(function () { |
|
|
|
|
$input.tooltip('hide'); |
|
|
|
|
$input.tooltip('hide') |
|
|
|
|
.attr('data-original-title', t('core', 'Copy')) |
|
|
|
|
.tooltip('fixTitle'); |
|
|
|
|
}, 3000); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
@ -333,10 +339,11 @@ |
|
|
|
|
publicUploadLabel: t('core', 'Allow upload and editing'), |
|
|
|
|
hideFileListLabel: t('core', 'Hide file listing'), |
|
|
|
|
mailPrivatePlaceholder: t('core', 'Email link to person'), |
|
|
|
|
mailButtonText: t('core', 'Send'), |
|
|
|
|
copy: t('core', 'Copy') |
|
|
|
|
mailButtonText: t('core', 'Send') |
|
|
|
|
})); |
|
|
|
|
|
|
|
|
|
this.$el.find('.clipboardButton').tooltip({placement: 'bottom', title: t('core', 'Copy'), trigger: 'hover'}); |
|
|
|
|
|
|
|
|
|
this.delegateEvents(); |
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
|
|