don't halt the page load while waiting for this
This commit is contained in:
parent
ed4b62dc71
commit
15f78d9883
1 changed files with 13 additions and 11 deletions
|
@ -228,18 +228,20 @@ class Setup extends SimpleExtension {
|
||||||
checkbox.disabled = true;
|
checkbox.disabled = true;
|
||||||
out_span.innerHTML = '(testing...)';
|
out_span.innerHTML = '(testing...)';
|
||||||
|
|
||||||
http_request = getHTTPObject();
|
$(document).ready(function() {
|
||||||
http_request.open('GET', '$test_url', false);
|
http_request = getHTTPObject();
|
||||||
http_request.send(null);
|
http_request.open('GET', '$test_url', false);
|
||||||
|
http_request.send(null);
|
||||||
|
|
||||||
if(http_request.status == 200 && http_request.responseText == 'ok') {
|
if(http_request.status == 200 && http_request.responseText == 'ok') {
|
||||||
checkbox.disabled = false;
|
checkbox.disabled = false;
|
||||||
out_span.innerHTML = '(tested ok)';
|
out_span.innerHTML = '(tested ok)';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
checkbox.disabled = true;
|
checkbox.disabled = true;
|
||||||
out_span.innerHTML = '(test failed)';
|
out_span.innerHTML = '(test failed)';
|
||||||
}
|
}
|
||||||
|
});
|
||||||
</script>";
|
</script>";
|
||||||
$sb = new SetupBlock("General");
|
$sb = new SetupBlock("General");
|
||||||
$sb->position = 0;
|
$sb->position = 0;
|
||||||
|
|
Reference in a new issue