1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-09 11:42:28 +01:00

Small changes to code style

This commit is contained in:
Chaoyi Zha 2018-03-29 00:01:38 -04:00
parent 298c22a821
commit e5dbcda2ea
2 changed files with 7 additions and 6 deletions

View File

@ -23,15 +23,16 @@ $('#generate-qr-code').click(function () {
});
var clipboard = new Clipboard('[data-clipboard]');
var clipboard = new Clipboard('#clipboard-copy');
clipboard.on('success', function(e) {
e.clearSelection();
$('[data-clipboard]').tooltip('show');
$('#clipboard-copy').tooltip('show');
});
$('[data-clipboard]').on('blur',function () {
$(this).tooltip('destroy')
$('#clipboard-copy').on('blur',function () {
$(this).tooltip('destroy');
}).on('mouseleave',function () {
$(this).tooltip('destroy')
$(this).tooltip('destroy');
});
$(function () {

View File

@ -8,7 +8,7 @@
<h3>Shortened URL</h3>
<div class="input-group">
<input type='text' class='result-box form-control' value='{{$short_url}}' id='short_url' />
<div class='input-group-addon' data-clipboard='' data-clipboard-target='#short_url' data-toggle='tooltip' data-placement='bottom' data-title='Copied!'>
<div class='input-group-addon' id='clipboard-copy' data-clipboard-target='#short_url' data-toggle='tooltip' data-placement='bottom' data-title='Copied!'>
<i class='fa fa-clipboard' aria-hidden='true' title='Copy to clipboard'></i>
</div>
</div>