// Email link
var filename = document.getElementById('file_select').files[0].name;
- var b = encodeURIComponent("<?php echo t("DL"); ?> \"" + filename + "\":") + "%0D";
- b += encodeURIComponent(web_root + download_link_href) + "%0D";
+ var b = encodeURIComponent("<?php echo t("DL"); ?> \"" + filename + "\":") + "%0D" + "%0A";
+ b += encodeURIComponent(web_root + download_link_href) + "%0D" + "%0A";
if (false == isEmpty(date))
{
- b += "%0D" + encodeURIComponent("<?php echo t("VALID_UNTIL"); ?>: " + date.format('YYYY-MM-DD hh:mm (GMT O)')) + "%0D";
+ b += "%0D" + "%0A" + encodeURIComponent("<?php echo t("VALID_UNTIL"); ?>: " + date.format('YYYY-MM-DD hh:mm (GMT O)')) + "%0D" + "%0A";
document.getElementById('upload_link_email').href = "mailto:?body=" + b + "&subject=" + encodeURIComponent(filename);
}
}
if (time == 'month')
{
- d.setSeconds (d.getSeconds() + 2419200);
+ d.setSeconds (d.getSeconds() + 2592000);
return true;
}
if (time == 'quarter')
{
- d.setSeconds (d.getSeconds() + 7257600);
+ d.setSeconds (d.getSeconds() + 7776000);
return true;
}
if (time == 'year')
{
- d.setSeconds (d.getSeconds() + 29030400);
+ d.setSeconds (d.getSeconds() + 31536000);
return true;
}
return false;
}
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