]> git.p6c8.net - jirafeau.git/commitdiff
add mailto link with image next to download page link
authorJerome Jutteau <mojo@couak.net>
Sat, 25 Apr 2015 10:44:23 +0000 (12:44 +0200)
committerJerome Jutteau <mojo@couak.net>
Sat, 25 Apr 2015 14:23:58 +0000 (16:23 +0200)
closes #31

Signed-off-by: Jerome Jutteau <mojo@couak.net>
index.php
lib/functions_v6.js [moved from lib/functions_v5.js with 98% similarity]
lib/template/header.php
media/courgette/email.png [new file with mode: 0644]
media/courgette/style.css.php
media/industrial/email.png [new file with mode: 0644]
media/industrial/style.css.php
media/jyraphe/email.png [new file with mode: 0644]
media/jyraphe/style.css.php
media/modern/email.png [new file with mode: 0644]
media/modern/style.css.php

index 86220f7e9399e7f178efc71921d74ccb0c392493..8cb0b864d9d606a8f9b7ec0b8377385f73ae5617 100644 (file)
--- a/index.php
+++ b/index.php
@@ -97,7 +97,10 @@ if (jirafeau_has_upload_password ($cfg))
     <p><?php echo t('File uploaded !') ?></p>
 
     <div id="upload_finished_download_page">
-    <p><?php echo t('Download page') ?></p>
+    <p>
+          <?php echo t('Download page') ?> 
+          <a id="upload_link_email" href=""><img id="upload_image_email"/></a>
+    </p>
     <p><a id="upload_link" href=""></a></p>
     </div>
 
similarity index 98%
rename from lib/functions_v5.js
rename to lib/functions_v6.js
index 031e7f410b8dd52e17ecf0fee4ede03f4db21b5d..263d8fa14707ea93b9c8a2f6e34fcaaf6056d527 100644 (file)
@@ -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 + '&amp;d=' + delete_code;
     var delete_link_href = url + 'f.php?h=' + reference + '&d=' + delete_code;
index 2aab081eaa60b4a7b84e72b47202f2907f77716b..92937e24109c9241aa2c3eac61c2f328c087bc34 100644 (file)
@@ -35,6 +35,6 @@ else
   <link href="<?php echo $web_root . 'media/' . $style . '/style.css.php'; ?>" rel="stylesheet" type="text/css" />
 </head>
 <body>
-<script language="Javascript" src="lib/functions_v5.js"></script>
+<script language="Javascript" src="lib/functions_v6.js"></script>
 <div id="content">
 <h1><a href="<?php echo $web_root; ?>"><?php echo t('Jirafeau, your web file repository'); ?></a></h1>
diff --git a/media/courgette/email.png b/media/courgette/email.png
new file mode 100644 (file)
index 0000000..234a229
Binary files /dev/null and b/media/courgette/email.png differ
index 3bb25a9cc827cac5fc304c547b365dfafffa3a68..5af7f58bbb656219c3df170ce8a0d047f97d2cf7 100644 (file)
@@ -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 (file)
index 0000000..234a229
Binary files /dev/null and b/media/industrial/email.png differ
index 1fc4cc16f2740e17127fefdc591562861d1af649..7c1cf563899a01a7ff0797aca59c0d8078917427 100644 (file)
@@ -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 (file)
index 0000000..234a229
Binary files /dev/null and b/media/jyraphe/email.png differ
index 6a1634c1a5dd1f73da734fc56540f6c7487cf117..376703bda54648159b500f918d776e90e66b8b62 100644 (file)
@@ -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 (file)
index 0000000..234a229
Binary files /dev/null and b/media/modern/email.png differ
index 8b4b46a0be9ba53c952bf30722c75c23725642d8..122be064a6fe4b52cc4478319892e7f1c7977ce4 100644 (file)
@@ -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;
+}

patrick-canterino.de