summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2016-11-16 17:57:35 +0100
committerGitHub <noreply@github.com>2016-11-16 17:57:35 +0100
commit7100a1b3472f35ba8edb6e427fa6657dc53ef63b (patch)
treee72440996e3016a5a488efb58195c4f19c4258c6 /apps/federatedfilesharing
parent61453f5fd5eb3e742d1c757def36ce8f6be408f3 (diff)
parentb7e6e9f83ce9d3ef3754813fe6bfb520e0fb11a2 (diff)
downloadnextcloud-server-7100a1b3472f35ba8edb6e427fa6657dc53ef63b.tar.gz
nextcloud-server-7100a1b3472f35ba8edb6e427fa6657dc53ef63b.zip
Merge pull request #2146 from nextcloud/add_copy_tooltip_to_clipboard
Adds copy tooltip to clipboards
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r--apps/federatedfilesharing/js/settings-personal.js31
1 files changed, 21 insertions, 10 deletions
diff --git a/apps/federatedfilesharing/js/settings-personal.js b/apps/federatedfilesharing/js/settings-personal.js
index f89022dc8a0..04096cb0416 100644
--- a/apps/federatedfilesharing/js/settings-personal.js
+++ b/apps/federatedfilesharing/js/settings-personal.js
@@ -20,14 +20,21 @@ $(document).ready(function() {
}
});
+ $('#fileSharingSettings .clipboardButton').tooltip({placement: 'bottom', title: t('core', 'Copy'), trigger: 'hover'});
+
// Clipboard!
var clipboard = new Clipboard('.clipboardButton');
clipboard.on('success', function(e) {
$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) {
@@ -41,14 +48,18 @@ $(document).ready(function() {
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);
});
+
+
+ $('#fileSharingSettings .hasTooltip').tooltip({placement: 'right'});
});