mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-12-28 12:30:44 +00:00
add processing of errors in response (timeout, server error, expired session, etc.)
This commit is contained in:
parent
2182167574
commit
67f3884315
@ -38,6 +38,18 @@ function check(url, rule) {
|
||||
var success = target.find('.alert-success').length;
|
||||
sidebar.find('.badge.bg-success').toggleClass('hidden', !success);
|
||||
|
||||
sidebar.find('.spinner-border').addClass('hidden');
|
||||
},
|
||||
error: function(xhr, status){
|
||||
var sidebar = jQuery('#jed-' + rule);
|
||||
var target = jQuery('#police-check-result-' + rule);
|
||||
|
||||
target.html('<span class="text-danger"><b>' + status + ':</b> ' + xhr.status + ' ' + xhr.statusText + '</span>');
|
||||
|
||||
sidebar.find('.badge.bg-danger').text('?');
|
||||
sidebar.find('.badge.bg-warning,.badge.bg-secondary,.badge.bg-info').text('');
|
||||
sidebar.find('.badge.bg-success').addClass('hidden');
|
||||
|
||||
sidebar.find('.spinner-border').addClass('hidden');
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user