mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-25 10:42:58 -03:00
#1123 Load the ajax.gif in receive.js via relative directory, now that static path is not... static
This commit is contained in:
parent
1c424500f0
commit
ff0427daea
1 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,11 @@ $(function(){
|
|||
$('#flashes').append($('<li>').addClass(category).text(message));
|
||||
};
|
||||
|
||||
var scriptEls = document.getElementsByTagName( 'script' );
|
||||
var thisScriptEl = scriptEls[scriptEls.length - 1];
|
||||
var scriptPath = thisScriptEl.src;
|
||||
var scriptFolder = scriptPath.substr(0, scriptPath.lastIndexOf( '/' )+1 );
|
||||
|
||||
// Intercept submitting the form
|
||||
$('#send').submit(function(event){
|
||||
event.preventDefault();
|
||||
|
@ -38,7 +43,7 @@ $(function(){
|
|||
// and update the status
|
||||
if(event.loaded == event.total) {
|
||||
$('.cancel', ajax.$upload_div).remove();
|
||||
$('.upload-status', ajax.$upload_div).html('<img src="/static/img/ajax.gif" alt="" /> Waiting for data to finish traversing Tor network ...');
|
||||
$('.upload-status', ajax.$upload_div).html('<img src="' + scriptFolder + '../img/ajax.gif" alt="" /> Waiting for data to finish traversing Tor network ...');
|
||||
}
|
||||
}, false);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue