We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 74387e75 authored by Zach Copley's avatar Zach Copley

Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x

parents 262126bd 306639c0
......@@ -253,16 +253,34 @@ var SN = { // StatusNet
.attr(SN.C.S.Disabled, SN.C.S.Disabled);
},
error: function (xhr, textStatus, errorThrown) {
alert(errorThrown || textStatus);
// If the server end reported an error from StatusNet,
// find it -- otherwise we'll see what was reported
// from the browser.
var errorReported = null;
if (xhr.responseXML) {
errorReported = $('#error', xhr.responseXML).text();
}
alert(errorReported || errorThrown || textStatus);
// Restore the form to original state.
// Hopefully. :D
form
.removeClass(SN.C.S.Processing)
.find('.submit')
.removeClass(SN.C.S.Disabled)
.removeAttr(SN.C.S.Disabled);
},
success: function(data, textStatus) {
if (typeof($('form', data)[0]) != 'undefined') {
form_new = document._importNode($('form', data)[0], true);
form.replaceWith(form_new);
}
else {
else if (typeof($('p', data)[0]) != 'undefined') {
form.replaceWith(document._importNode($('p', data)[0], true));
}
else {
alert('Unknown error.');
}
}
});
},
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment