summaryrefslogtreecommitdiffstats
path: root/settings/js/authtoken_view.js
diff options
context:
space:
mode:
Diffstat (limited to 'settings/js/authtoken_view.js')
-rw-r--r--settings/js/authtoken_view.js28
1 files changed, 18 insertions, 10 deletions
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);
});
},