summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-03-18 03:58:29 +0000
committerGo MAEDA <maeda@farend.jp>2021-03-18 03:58:29 +0000
commit44ea826a21071ab3e0b07ecfcd56020eea219078 (patch)
tree6006b28121b01d573d3545c23010bea66e8c189e /public
parent06ac3473e0eb9d233611320ca2ed6d2c3e4f6547 (diff)
downloadredmine-44ea826a21071ab3e0b07ecfcd56020eea219078.tar.gz
redmine-44ea826a21071ab3e0b07ecfcd56020eea219078.zip
"Copy link" feature for issue and issue journal (#34703).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@20816 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r--public/images/copy_link.pngbin0 -> 1731 bytes
-rw-r--r--public/javascripts/application.js17
-rw-r--r--public/stylesheets/application.css1
3 files changed, 18 insertions, 0 deletions
diff --git a/public/images/copy_link.png b/public/images/copy_link.png
new file mode 100644
index 000000000..2a2eb09ff
--- /dev/null
+++ b/public/images/copy_link.png
Binary files differ
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; }