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

The ajax callback passed to AjaxSqueezeNode receives the stardard jQuery...

The ajax callback passed to AjaxSqueezeNode receives the stardard jQuery arguments but it was not called applyed to the target element.

The standard callback signature is:
callback(res,status)  

- res is the code returned by AjaxSqueezeNode

- status is a string that contains "success", "error" or "notmodified"

Inside callback "this" is now correctly the target element
parent 6e1912d5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -246,7 +246,7 @@ function AjaxSqueezeNode(trig, target, f)
callback = function() { verifForm(this);}
}
else {
callback = function(res,status) { f(res,status); verifForm(this);}
callback = function(res,status) { f.apply(this,[res,status]); verifForm(this);}
}
if (typeof(trig) == 'string') {
......
......@@ -147,7 +147,7 @@ function decrire_logo($id_objet, $mode, $id, $width, $height, $img, $titre="", $
"<div class='spip_xx-small'>" .
$taille .
"\n<br />[" .
ajax_action_auteur("iconifier", "$id-$nom.$format", $script, "$id_objet=$id&type=$id_objet", array(_T('lien_supprimer')),'',"function(r,noeud) {noeud.innerHTML = r; \$('.form_upload_icon',noeud).async_upload(async_upload_icon);}") .
ajax_action_auteur("iconifier", "$id-$nom.$format", $script, "$id_objet=$id&type=$id_objet", array(_T('lien_supprimer')),'',"function(r,status) {this.innerHTML = r; \$('.form_upload_icon',this).async_upload(async_upload_icon);}") .
"]</div>");
}
?>
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter