Skip to content

Commit

Permalink
Merge pull request #85 from ViderumGlobal/fix-copy-clipboard
Browse files Browse the repository at this point in the history
Fix copy clipboard
  • Loading branch information
duskobogdanovski committed Jan 28, 2018
2 parents 5a80e00 + 6f7c1b3 commit 2577a7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions ckanext/querytool/fanstatic/javascript/public_query.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,9 @@
$('#appendedInputButtons').val(window.location.href);
$('.copyToClipboard').on('click',
function () {
var $temp = $("<input>");
$("body").append($temp);
$temp.val($('#appendedInputButtons').val()).select();
document.execCommand("copy");
var copyText = $('#appendedInputButtons');
copyText.select();
document.execCommand("Copy");
});
});

Expand Down
2 changes: 1 addition & 1 deletion ckanext/querytool/templates/querytool/public/read.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% resource "querytool/javascript/public_query.js" %}
{% resource 'querytool/vendor/c3/c3.css' %}
{% resource 'querytool/vendor/d3/d3.js' %}
{% resource 'querytool/vendor/c3/c3.js' %}
{% resource "querytool/javascript/public_query.js" %}
{% resource 'querytool/javascript/modules/viz-preview.js' %}
{% resource 'querytool/javascript/modules/tool-embed.js' %}
{% import 'macros/form.html' as form %}
Expand Down

0 comments on commit 2577a7d

Please sign in to comment.