diff options
-rw-r--r-- | apps/federatedfilesharing/js/settings-personal.js | 31 | ||||
-rw-r--r-- | apps/federatedfilesharing/templates/settings-personal.php | 2 | ||||
-rw-r--r-- | apps/updatenotification/js/admin.js | 2 | ||||
-rw-r--r-- | core/js/sharedialoglinkshareview.js | 33 | ||||
-rw-r--r-- | settings/js/authtoken_view.js | 28 | ||||
-rw-r--r-- | settings/templates/personal.php | 2 |
6 files changed, 63 insertions, 35 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'}); }); diff --git a/apps/federatedfilesharing/templates/settings-personal.php b/apps/federatedfilesharing/templates/settings-personal.php index c8fc1caf7d6..98a1cd7f751 100644 --- a/apps/federatedfilesharing/templates/settings-personal.php +++ b/apps/federatedfilesharing/templates/settings-personal.php @@ -12,7 +12,7 @@ style('federatedfilesharing', 'settings-personal'); <p> <?php p($l->t('Your Federated Cloud ID:')); ?> <strong id="cloudid"><?php p($_['cloudId']); ?></strong> - <a class="clipboardButton icon icon-clippy hasTooltip" data-clipboard-target="#cloudid" title="<?php p($l->t('Copy')); ?>"></a> + <a class="clipboardButton icon icon-clippy" data-clipboard-target="#cloudid"></a> </p> <br> diff --git a/apps/updatenotification/js/admin.js b/apps/updatenotification/js/admin.js index 813ec48c87a..589765348af 100644 --- a/apps/updatenotification/js/admin.js +++ b/apps/updatenotification/js/admin.js @@ -72,4 +72,6 @@ $(document).ready(function(){ groups = JSON.stringify(groups); OCP.AppConfig.setValue('updatenotification', 'notify_groups', groups); }); + + $('#oca_updatenotification_section .icon-info').tooltip({placement: 'right'}); }); diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index 3ba124efc15..85a20dce01a 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -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; diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js index 6eb04b63f20..391ac6c7a76 100644 --- a/settings/js/authtoken_view.js +++ b/settings/js/authtoken_view.js @@ -219,14 +219,21 @@ this._hideAppPasswordBtn = $('#app-password-hide'); this._hideAppPasswordBtn.click(_.bind(this._hideToken, this)); + this._result.find('.clipboardButton').tooltip({placement: 'bottom', title: t('core', 'Copy'), trigger: 'hover'}); + // Clipboard! 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) { @@ -240,14 +247,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); }); }, diff --git a/settings/templates/personal.php b/settings/templates/personal.php index ddf09444e5d..ea1c7ba6459 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -241,7 +241,7 @@ if($_['passwordChangeSupported']) { <div class="app-password-row"> <span class="app-password-label"><?php p($l->t('Password')); ?></span> <input id="new-app-password" type="text" readonly="readonly"/> - <a class="clipboardButton icon icon-clippy hasTooltip" data-clipboard-target="#new-app-password" title="<?php p($l->t('Copy')); ?>"></a> + <a class="clipboardButton icon icon-clippy" data-clipboard-target="#new-app-password"></a> <button id="app-password-hide" class="button"><?php p($l->t('Done')); ?></button> </div> </div> |