Add individual mailto link to each uploaded file

This commit is contained in:
Luc Didry 2015-10-03 01:37:24 +02:00
parent 995a383294
commit fbbbcab403
13 changed files with 43 additions and 20 deletions

View File

@ -1,4 +1,5 @@
.icon-download:before { content: '\e800'; } /* '' */
.icon-clipboard:before { content: '\e801'; } /* '' */
.icon-trash:before { content: '\e802'; } /* '' */
.icon-trash:before { content: '\e802'; } /* '' */
.icon-mail:before { content: '\e803'; } /* '' */

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,5 @@
.icon-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-clipboard { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-mail { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }

View File

@ -12,4 +12,5 @@
.icon-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-clipboard { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-mail { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }

View File

@ -1,10 +1,10 @@
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?93658459');
src: url('../font/fontello.eot?93658459#iefix') format('embedded-opentype'),
url('../font/fontello.woff?93658459') format('woff'),
url('../font/fontello.ttf?93658459') format('truetype'),
url('../font/fontello.svg?93658459#fontello') format('svg');
src: url('../font/fontello.eot?83820521');
src: url('../font/fontello.eot?83820521#iefix') format('embedded-opentype'),
url('../font/fontello.woff?83820521') format('woff'),
url('../font/fontello.ttf?83820521') format('truetype'),
url('../font/fontello.svg?83820521#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
@ -14,7 +14,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?93658459#fontello') format('svg');
src: url('../font/fontello.svg?83820521#fontello') format('svg');
}
}
*/
@ -56,4 +56,5 @@
.icon-download:before { content: '\e800'; } /* '' */
.icon-clipboard:before { content: '\e801'; } /* '' */
.icon-trash:before { content: '\e802'; } /* '' */
.icon-trash:before { content: '\e802'; } /* '' */
.icon-mail:before { content: '\e803'; } /* '' */

View File

@ -28,3 +28,12 @@ Font license info
Homepage: http://designmodo.com/linecons-free/
## MFG Labs
Copyright (C) 2012 by Daniel Bruce
Author: MFG Labs
License: SIL (http://scripts.sil.org/OFL)
Homepage: http://www.mfglabs.com/

Binary file not shown.

View File

@ -9,6 +9,7 @@
<glyph glyph-name="download" unicode="&#xe800;" d="m714 100q0 15-10 25t-25 11-26-11-10-25 10-25 26-11 25 11 10 25z m143 0q0 15-10 25t-26 11-25-11-10-25 10-25 25-11 26 11 10 25z m72 125v-179q0-22-16-37t-38-16h-821q-23 0-38 16t-16 37v179q0 22 16 38t38 16h259l75-76q33-32 76-32t76 32l76 76h259q22 0 38-16t16-38z m-182 318q10-23-8-40l-250-250q-10-10-25-10t-25 10l-250 250q-17 17-8 40 10 21 33 21h143v250q0 15 11 25t25 11h143q14 0 25-11t10-25v-250h143q24 0 33-21z" horiz-adv-x="928.6" />
<glyph glyph-name="clipboard" unicode="&#xe801;" d="m0-150l0 904 225 0 0-64-161 0 0-774 579 0 0 774-161 0 0 64 225 0 0-904-707 0z m129 129l0 31 31 0 0-31-31 0z m0 121l0 31 31 0 0-31-31 0z m0 121l0 31 31 0 0-31-31 0z m0 121l0 32 31 0 0-32-31 0z m0 121l0 32 31 0 0-32-31 0z m0 96l0 94 129 0 0 97q0 41 27 71t69 29 69-30 28-70q0-56-2-97l129 0 0-94-449 0z m96-582l0 33 353 0 0-33-353 0z m0 121l0 33 353 0 0-33-353 0z m0 121l0 33 353 0 0-33-353 0z m0 121l0 34 353 0 0-34-353 0z m0 121l0 34 353 0 0-34-353 0z m97 260q0-14 9-22t23-9 22 9 9 22-9 24-22 9-23-9-9-24z" horiz-adv-x="707" />
<glyph glyph-name="trash" unicode="&#xe802;" d="m0 569l0 68q2 37 29 63t65 25l94 0 0 31q0 39 27 67t66 27l313 0q39 0 66-27t28-67l0-31 93 0q37 0 65-25t29-63l0-68q0-26-19-44t-44-19l0-531q0-53-36-89t-88-36l-500 0q-53 0-89 36t-36 89l0 531q-26 0-44 19t-19 44z m63 0l749 0 0 62q0 14-8 23t-23 8l-687 0q-14 0-23-8t-8-23l0-62z m62-594q0-25 19-44t44-19l500 0q25 0 43 19t19 44l0 531-625 0 0-531z m63 31l0 407q0 13 8 22t23 9l62 0q14 0 23-9t9-22l0-407q0-13-9-22t-23-9l-62 0q-14 0-23 9t-8 22z m31 0l62 0 0 407-62 0 0-407z m31 719l375 0 0 31q0 14-9 23t-22 8l-313 0q-13 0-22-8t-9-23l0-31z m125-719l0 407q0 13 9 22t22 9l63 0q13 0 22-9t9-22l0-407q0-13-9-22t-22-9l-63 0q-13 0-22 9t-9 22z m31 0l63 0 0 407-63 0 0-407z m157 0l0 407q0 13 8 22t23 9l62 0q14 0 23-9t9-22l0-407q0-13-9-22t-23-9l-62 0q-14 0-23 9t-8 22z m31 0l62 0 0 407-62 0 0-407z" horiz-adv-x="875" />
<glyph glyph-name="mail" unicode="&#xe803;" d="m0 28v644q0 8 2 18l460-460q39-39 95-39 55 0 94 39l460 460q2-9 2-18v-644q0-37-26-62t-62-26h-937q-36 0-62 26t-26 62z m63 728q13 4 25 4h937q12 0 25-4l-463-463q-13-12-31-12t-30 12z" horiz-adv-x="1113.3" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Binary file not shown.

View File

@ -12,6 +12,12 @@
"code": 59392,
"src": "fontawesome"
},
{
"uid": "a17986e457f3d85f26c9c240dfd6a4ba",
"css": "mail",
"code": 59395,
"src": "mfglabs"
},
{
"uid": "c9bef3dc67fea47e94c4a5030ea64dad",
"css": "clipboard",

View File

@ -110,7 +110,7 @@ function uploadFile(i, delay, del_at_first_view) {
var r = document.getElementById('ul-results');
var w = document.createElement('li');
w.setAttribute('class', 'list-group-item');
w.innerHTML='<div><p>'+file.name+'</p></div><div class="progress"><div id="progress-'+i+'" style="width: 0%;" data-key="'+randomkey+'" data-name="'+file.name+'" aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" role="progressbar" class="progress-bar"><span class="sr-only">'+file.name+'0%</span></div></div>';
w.innerHTML='<div><p id="name-'+i+'">'+file.name+'</p></div><div class="progress"><div id="progress-'+i+'" style="width: 0%;" data-key="'+randomkey+'" data-name="'+file.name+'" aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" role="progressbar" class="progress-bar"><span class="sr-only">'+file.name+'0%</span></div></div>';
r.appendChild(w);
sliceAndUpload(randomkey, i, parts, 0, delay, del_at_first_view, null);
@ -171,10 +171,13 @@ function updateProgressBar(data) {
var key = dp.getAttribute('data-key');
if (j + 1 === parts) {
var n = document.getElementById('name-'+i);
var d = document.createElement('div');
var baseURL = document.location.href.replace(/#$/, '');
var url = baseURL+'r/'+short+'#'+key;
var del_url = baseURL+'d/'+short+'/'+data.token;
var links = encodeURIComponent('["'+short+'"]');
n.innerHTML = n.innerHTML+' <a href="'+baseURL+'m?links='+links+'"><span class="icon icon-mail"></span></a>';
d.innerHTML = '<div class="form-group"><label class="sr-only" for="'
+short
+'">'
@ -213,7 +216,7 @@ function updateProgressBar(data) {
// Add copy all and mailto buttons
var misc = document.getElementById('misc');
if (misc.innerHTML === '') {
misc.innerHTML = '<a href="#" onclick="copyAllToClipboard();" class="btn btn-info">'+i18n.copyAll+'</a> <a id="mailto" href="'+baseURL+'m?links=["'+short+'"]" class="btn btn-info">'+i18n.mailTo+'</a>';
misc.innerHTML = '<a href="#" onclick="copyAllToClipboard();" class="btn btn-info">'+i18n.copyAll+'</a> <a id="mailto" href="'+baseURL+'m?links='+links+'" class="btn btn-info">'+i18n.mailTo+'</a>';
} else {
var a = document.getElementsByClassName('link-input');
var l = new Array();

View File

@ -38,7 +38,6 @@
</div>
%= javascript begin
function findItem(name) {
console.log(name);
var files = localStorage.getItem('files');
if (files === null) {
files = new Array();