Copy to clipboard for shots

This commit is contained in:
2016-09-23 18:07:11 +02:00
parent 303d1c48ae
commit 5f3bab95e2
3 changed files with 49 additions and 2 deletions

View File

@@ -303,3 +303,11 @@ $(function() {
task_open(task_id);
});
});
/* Copy to clipboard when clicking on an input with 'copy-to-clipboard' class */
$('body').on('click', '.copy-to-clipboard', function(e){
e.preventDefault();
$(this).select();
document.execCommand('copy');
});