}
} else if (ajax.xml_client.status == 403) {
window.location.reload();
+ } else if (ajax.xml_client.status >= 500) {
+ alert("Une erreur s'est produite lors du traitement de la requête");
}
}
};
function previewWiki(idFrom, idTo, withTitle, idShow)
{
- var text = encodeURIComponent(document.getElementById(idFrom).value);
+ var text = document.getElementById(idFrom).value;
if (text == "") {
return false;
}
if (!withTitle) {
url += "/notitle";
}
- Ajax.update_html(idTo, url + "?text=" + text);
+ $.post(url, { text: text },
+ function(data) {
+ $("#" + idTo).html(data);
+ },
+ 'text');
if (idShow != null) {
document.getElementById(idShow).style.display = "";
}
}
-function sendTestEmail(token, forlife)
+function sendTestEmail(token, hruid)
{
- Ajax.update_html(null, 'emails/test' + (forlife == null ? '' : '/' + forlife) + '?token=' + token,
+ Ajax.update_html(null, 'emails/test' + (hruid == null ? '' : '/' + hruid) + '?token=' + token,
function() {
- showTempMessage('mail_sent', "Un mail a été envoyé avec succès"
- + (forlife == null ? " sur ton adresse." : " sur l'adresse de " + forlife),
+ showTempMessage('mail_sent', "Un email a été envoyé avec succès"
+ + (hruid == null ? " sur ton adresse." : " sur l'adresse de " + hruid),
true); });
return false;
}