mirror of
https://github.com/nextcloud/server.git
synced 2024-08-05 08:15:54 +02:00
Merge pull request #2146 from nextcloud/add_copy_tooltip_to_clipboard
Adds copy tooltip to clipboards
This commit is contained in:
commit
7100a1b347
@ -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'});
|
||||
});
|
||||
|
@ -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'});
|
||||
});
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user