allow send another file link to open in new tab

This commit is contained in:
Daniela Arcese 2017-07-18 17:16:07 -04:00
parent 95a83922df
commit acfcae5dec
4 changed files with 13 additions and 22 deletions

View file

@ -6,9 +6,9 @@ require('jquery-circle-progress');
const Raven = window.Raven; const Raven = window.Raven;
$(document).ready(function() { $(document).ready(function() {
$('#download-progress').hide(); $('#download-progress').hide();
$('.send-new').click(() => { //link back to homepage
window.location.replace(`${window.location.origin}`); $('.send-new').attr('href', window.location.origin);
});
const filename = $('#dl-filename').html(); const filename = $('#dl-filename').html();
//initiate progress bar //initiate progress bar

View file

@ -68,17 +68,8 @@ $(document).ready(function() {
fill: '#3B9DFF', fill: '#3B9DFF',
size: 158 size: 158
}); });
// link back to home page //link back to homepage
$('.send-new').click(() => { $('.send-new').attr('href', window.location);
$('#upload-progress').hide();
$('#share-link').hide();
$('#upload-error').hide();
$copyBtn.attr('disabled', false);
$('#link').attr('disabled', false);
$copyBtn.html('Copy to Clipboard');
$('.upload-window').removeClass('ondrag');
$('#page-one').show();
});
// on file upload by browse or drag & drop // on file upload by browse or drag & drop
function onUpload(event) { function onUpload(event) {

View file

@ -38,9 +38,9 @@
</div> </div>
</div> </div>
<div class="send-new" title="Try Firefox Send"> <a class="send-new" title="Try Firefox Send">
Try Firefox Send Try Firefox Send
</div> </a>
{{else}} {{else}}
<div class="title"> <div class="title">
This link has expired or never existed in the first place. This link has expired or never existed in the first place.
@ -52,9 +52,9 @@
<div class="expired-description"> <div class="expired-description">
Send files through a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever. Send files through a safe, private, and encrypted link that automatically expires to ensure your stuff does not remain online forever.
</div> </div>
<div class="send-new" title="Try Firefox Send"> <a class="send-new" title="Try Firefox Send">
Try Firefox Send Try Firefox Send
</div> </a>
{{/if}} {{/if}}
</div> </div>
</div> </div>

View file

@ -74,9 +74,9 @@
<button id="copy-btn" title="Copy to Clipboard">Copy to Clipboard</button> <button id="copy-btn" title="Copy to Clipboard">Copy to Clipboard</button>
</div> </div>
<button id="delete-file" title="Delete file">Delete file</button> <button id="delete-file" title="Delete file">Delete file</button>
<div class="send-new" title="Send another file"> <a class="send-new" title="Send another file">
Send another file Send another file
</div> </a>
</div> </div>
</div> </div>
@ -88,9 +88,9 @@
There has been an error uploading the file. There has been an error uploading the file.
</div> </div>
<img id="upload-error-img" src="/resources/illustration_error.svg" alt="Upload error" /> <img id="upload-error-img" src="/resources/illustration_error.svg" alt="Upload error" />
<div class="send-new" title="Send another file"> <a class="send-new" title="Send another file">
Send another file Send another file
</div> </a>
</div> </div>
<div id="unsupported-browser"> <div id="unsupported-browser">