From 777eeaa386e65193660e936fd5d7b12d05561c21 Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Sat, 25 Apr 2015 12:44:23 +0200 Subject: [PATCH] add mailto link with image next to download page link closes #31 Signed-off-by: Jerome Jutteau --- index.php | 5 ++++- lib/{functions_v5.js => functions_v6.js} | 5 +++++ lib/template/header.php | 2 +- media/courgette/email.png | Bin 0 -> 596 bytes media/courgette/style.css.php | 6 ++++++ media/industrial/email.png | Bin 0 -> 596 bytes media/industrial/style.css.php | 7 +++++++ media/jyraphe/email.png | Bin 0 -> 596 bytes media/jyraphe/style.css.php | 6 ++++++ media/modern/email.png | Bin 0 -> 596 bytes media/modern/style.css.php | 6 ++++++ 11 files changed, 35 insertions(+), 2 deletions(-) rename lib/{functions_v5.js => functions_v6.js} (98%) create mode 100644 media/courgette/email.png create mode 100644 media/industrial/email.png create mode 100644 media/jyraphe/email.png create mode 100644 media/modern/email.png diff --git a/index.php b/index.php index 86220f7..8cb0b86 100644 --- a/index.php +++ b/index.php @@ -97,7 +97,10 @@ if (jirafeau_has_upload_password ($cfg))

-

+

+ + +

diff --git a/lib/functions_v5.js b/lib/functions_v6.js similarity index 98% rename from lib/functions_v5.js rename to lib/functions_v6.js index 031e7f4..263d8fa 100644 --- a/lib/functions_v5.js +++ b/lib/functions_v6.js @@ -38,6 +38,11 @@ function show_link (url, reference, delete_code, crypt_key, date) document.getElementById('upload_link').href = download_link_href; } + // Email link + var filename = document.getElementById('file_select').files[0].name; + var b = "Download%20%22" + filename + "%22 :%0D" + download_link_href + "%0D"; + document.getElementById('upload_link_email').href = "mailto:?body=" + b + "&subject=" + filename; + // Delete link var delete_link = url + 'f.php?h=' + reference + '&d=' + delete_code; var delete_link_href = url + 'f.php?h=' + reference + '&d=' + delete_code; diff --git a/lib/template/header.php b/lib/template/header.php index 2aab081..92937e2 100644 --- a/lib/template/header.php +++ b/lib/template/header.php @@ -35,6 +35,6 @@ else - +

diff --git a/media/courgette/email.png b/media/courgette/email.png new file m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