From: Jerome Jutteau Date: Sat, 25 Apr 2015 10:44:23 +0000 (+0200) Subject: add mailto link with image next to download page link X-Git-Tag: 1.1~102 X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/commitdiff_plain/777eeaa386e65193660e936fd5d7b12d05561c21?ds=sidebyside add mailto link with image next to download page link closes #31 Signed-off-by: Jerome Jutteau --- 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 mode 100644 index 0000000..234a229 Binary files /dev/null and b/media/courgette/email.png differ diff --git a/media/courgette/style.css.php b/media/courgette/style.css.php index 3bb25a9..5af7f58 100644 --- a/media/courgette/style.css.php +++ b/media/courgette/style.css.php @@ -263,6 +263,12 @@ input[type="submit"]:focus { font-weight: bold; } +#upload_image_email { + padding-left: 20px; + margin-left: 10px; + background: url(email.png) no-repeat; +} + /* ========================================================================== 5 = Terms of service ========================================================================== */ diff --git a/media/industrial/email.png b/media/industrial/email.png new file mode 100644 index 0000000..234a229 Binary files /dev/null and b/media/industrial/email.png differ diff --git a/media/industrial/style.css.php b/media/industrial/style.css.php index 1fc4cc1..7c1cf56 100644 --- a/media/industrial/style.css.php +++ b/media/industrial/style.css.php @@ -180,3 +180,10 @@ input:hover { font-weight: bold; color: red; } + +#upload_image_email { + padding-left: 20px; + margin-left: 10px; + background: url(email.png) no-repeat; +} + diff --git a/media/jyraphe/email.png b/media/jyraphe/email.png new file mode 100644 index 0000000..234a229 Binary files /dev/null and b/media/jyraphe/email.png differ diff --git a/media/jyraphe/style.css.php b/media/jyraphe/style.css.php index 6a1634c..376703b 100644 --- a/media/jyraphe/style.css.php +++ b/media/jyraphe/style.css.php @@ -229,3 +229,9 @@ h1 a { font-weight: bold; color: red; } + +#upload_image_email { + padding-left: 20px; + margin-left: 10px; + background: url(email.png) no-repeat; +} diff --git a/media/modern/email.png b/media/modern/email.png new file mode 100644 index 0000000..234a229 Binary files /dev/null and b/media/modern/email.png differ diff --git a/media/modern/style.css.php b/media/modern/style.css.php index 8b4b46a..122be06 100644 --- a/media/modern/style.css.php +++ b/media/modern/style.css.php @@ -225,3 +225,9 @@ font-size:90%; font-weight: bold; color: red; } + +#upload_image_email { + padding-left: 20px; + margin-left: 10px; + background: url(email.png) no-repeat; +}