Skip to content
Extraits de code Groupes Projets
Valider 2764b385 rédigé par renato's avatar renato
Parcourir les fichiers

allow multiple async uploads (upload more images not waiting for the complete...

allow multiple async uploads (upload more images not waiting for the complete upload of the former one)
parent af176929
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -15,20 +15,18 @@ jQuery.fn.async_upload = function(add_function) {
if(!form.async_init) {
form.async_init = true
jForm
.attr("target","upload_frame"+num)
.append("<input type='hidden' name='iframe' value='iframe'>")
.find("input[@name='redirect']")
.val("")
.end();
}
if (!form.jFrame) {
form.jFrame = $("<iframe id='upload_frame"+num+"' name='upload_frame"+num+"' frameborder='0' marginwidth='0' marginheight='0' scrolling='no' style='position:absolute;width:1px;height:1px;' onload='this.iframeload("+num+")'></iframe>")
jForm.attr("target","upload_frame"+num);
var jFrame = $("<iframe id='upload_frame"+num+"' name='upload_frame"+num+"' frameborder='0' marginwidth='0' marginheight='0' scrolling='no' style='position:absolute;width:1px;height:1px;' onload='this.iframeload("+num+")'></iframe>")
.appendTo("body");
}
//IE apparently do not write anything in an iframe onload event handler
form.jFrame[0].iframeload = function(num) {
jFrame[0].iframeload = function(num) {
//remove the previous message
$("div.upload_message",par).remove();
var res = $(".upload_answer",this.contentDocument || document.frames(this.name).document.body);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter