Fix tooltips - they now properly change on click
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
f7c637071a
commit
b7e6e9f83c
|
@ -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'});
|
||||
});
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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'});
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue