mirror of
https://github.com/onionshare/onionshare.git
synced 2025-04-25 17:59:17 -04: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
85bfdb60d1
commit
75da5a6675
@ -4,6 +4,11 @@ $(function(){
|
|||||||
$('#flashes').append($('<li>').addClass(category).text(message));
|
$('#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
|
// Intercept submitting the form
|
||||||
$('#send').submit(function(event){
|
$('#send').submit(function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@ -38,7 +43,7 @@ $(function(){
|
|||||||
// and update the status
|
// and update the status
|
||||||
if(event.loaded == event.total) {
|
if(event.loaded == event.total) {
|
||||||
$('.cancel', ajax.$upload_div).remove();
|
$('.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);
|
}, false);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user