BugFix #1046; Whenever the sieve server is unavailable an error message will appear.

This commit is contained in:
Alexandre Cloutier
2014-02-28 16:39:27 -05:00
parent 31ace947cb
commit 1b9ac03e94
3 changed files with 69 additions and 0 deletions

View File

@@ -80,11 +80,39 @@ function savePreferences(sender) {
}
if (sendForm) {
<<<<<<< HEAD
saveMailAccounts();
$("mainForm").submit();
}
return false;
=======
saveMailAccounts();
triggerAjaxRequest($("mainForm").readAttribute("action"), function (http) {
if (http.readyState == 4) {
var response = http.responseText.evalJSON(true);
if (http.status == 503) {
showAlertDialog(_(response.textStatus));
}
else if (http.status == 200) {
if (response.hasChanged == 1) {
window.opener.location.reload();
window.close();}
else {
window.close();}}
else {
showAlertDialog(_(response.textStatus));
}
}
},
null,
Form.serialize($("mainForm")), // excludes the file input
{ "Content-type": "application/x-www-form-urlencoded" });
}
return false;
>>>>>>> a005b93... bug 1046 finished, if sieve server is not responding an error message will appear
}
function prototypeIfyFilters() {