diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/images/copy_link.png | bin | 0 -> 1731 bytes | |||
-rw-r--r-- | public/javascripts/application.js | 17 | ||||
-rw-r--r-- | public/stylesheets/application.css | 1 |
3 files changed, 18 insertions, 0 deletions
diff --git a/public/images/copy_link.png b/public/images/copy_link.png Binary files differnew file mode 100644 index 000000000..2a2eb09ff --- /dev/null +++ b/public/images/copy_link.png diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 770d5900c..bef8f592f 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -563,6 +563,23 @@ function randomKey(size) { return key; } +function copyTextToClipboard(target) { + if (target) { + var temp = document.createElement('textarea'); + temp.value = target.getAttribute('data-clipboard-text'); + document.body.appendChild(temp); + temp.select(); + document.execCommand('copy'); + if (temp.parentNode) { + temp.parentNode.removeChild(temp); + } + if ($(target).closest('.drdn.expanded').length) { + $(target).closest('.drdn.expanded').removeClass("expanded"); + } + } + return false; +} + function updateIssueFrom(url, el) { $('#all_attributes input, #all_attributes textarea, #all_attributes select').each(function(){ $(this).data('valuebeforeupdate', $(this).val()); diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 1c2f76c15..0c4102459 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1612,6 +1612,7 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container { .icon-file.application-pdf { background-image: url(../images/files/pdf.png); } .icon-file.application-zip { background-image: url(../images/files/zip.png); } .icon-file.application-gzip { background-image: url(../images/files/zip.png); } +.icon-copy-link { background-image: url(../images/copy_link.png); } .sort-handle.ajax-loading { background-image: url(../images/loading.gif); } tr.ui-sortable-helper { border:1px solid #e4e4e4; } |