summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--apps/federatedfilesharing/js/settings-personal.js31
-rw-r--r--apps/updatenotification/js/admin.js2
-rw-r--r--core/js/sharedialoglinkshareview.js28
-rw-r--r--settings/js/authtoken_view.js28
4 files changed, 59 insertions, 30 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/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 bbc8f1b4547..85a20dce01a 100644
--- a/core/js/sharedialoglinkshareview.js
+++ b/core/js/sharedialoglinkshareview.js
@@ -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);
});
@@ -336,6 +342,8 @@
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 20fe5235eb0..0939913cc1a 100644
--- a/settings/js/authtoken_view.js
+++ b/settings/js/authtoken_view.js
@@ -233,14 +233,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) {
@@ -254,14 +261,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);
});
},