Commit ee70d917 authored by Jonny Bradley's avatar Jonny Bradley

[FIX] connect: Scroll to errors box and clean up after AJAX call errors

parent 2c6ba91e
......@@ -75,6 +75,10 @@ $("#connect_list_btn").click(function() {
$din.tabs();
} // error TODO
ajaxLoadingHide();
}).fail(function (xhr) {
$('html, body').animate({scrollTop: $("#error_report").offset().top}, 500);
$d.dialog("close");
ajaxLoadingHide();
});
},
open: function () {
......@@ -105,8 +109,8 @@ $("#connect_send_btn").click(function() {
if (data.status === "confirmed") {
$("input[name=connect_guid]").val(data.guid); // already set server-side but update form to match
}
spinner.tikiModal();
return false;
}).fail(function (xhr) {
$('html, body').animate({scrollTop: $("#error_report").offset().top}, 500);
});
} else {
$.getJSON($.service('connect', 'cancel'), {
......@@ -119,6 +123,9 @@ $("#connect_send_btn").click(function() {
} else {
alert(tr("The server did not reply"));
}
}).fail(function (xhr) {
$('html, body').animate({ scrollTop: $("#error_report").offset().top }, 500);
}).always(function () {
spinner.tikiModal();
return false;
});
......
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