X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/7496abe3c13d938d2da0e8c8a248bc704e9886da..07721aec51e54d92213638ae23a9ef8dbde9a0a8:/lib/functions.js.php?ds=sidebyside diff --git a/lib/functions.js.php b/lib/functions.js.php index 241a8e4..532787d 100644 --- a/lib/functions.js.php +++ b/lib/functions.js.php @@ -145,11 +145,11 @@ function show_link (reference, delete_code, crypt_key, date) // Email link var filename = document.getElementById('file_select').files[0].name; - var b = encodeURIComponent(" \"" + filename + "\":") + "%0D"; - b += encodeURIComponent(web_root + download_link_href) + "%0D"; + var b = encodeURIComponent(" \"" + filename + "\":") + "%0D" + "%0A"; + b += encodeURIComponent(web_root + download_link_href) + "%0D" + "%0A"; if (false == isEmpty(date)) { - b += "%0D" + encodeURIComponent(": " + date.format('YYYY-MM-DD hh:mm (GMT O)')) + "%0D"; + b += "%0D" + "%0A" + encodeURIComponent(": " + date.format('YYYY-MM-DD hh:mm (GMT O)')) + "%0D" + "%0A"; document.getElementById('upload_link_email').href = "mailto:?body=" + b + "&subject=" + encodeURIComponent(filename); } @@ -742,8 +742,10 @@ function copyLinkToClipboard(link_id) { } function addCopyListener(button_id, link_id) { - document.getElementById(button_id) + if(document.getElementById(button_id)){ + document.getElementById(button_id) .addEventListener("click", function() { copyLinkToClipboard(link_id);}); + } } // @license-end