mirror of
https://github.com/redmine/redmine.git
synced 2026-05-05 22:36:04 +02:00
"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
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user