diff --git a/web/skins/classic/views/js/log.js b/web/skins/classic/views/js/log.js index 692df185d..0cf31201d 100644 --- a/web/skins/classic/views/js/log.js +++ b/web/skins/classic/views/js/log.js @@ -40,7 +40,6 @@ function ajaxRequest(params) { // We won't automatically refresh to avoid disturbing the user who has selected rows. console.debug("The user selected rows in the table, and the AJAX request was rejected."); requestMissed = true; - updateHeaderRequestStatus("stopped"); return; } if (ajax && (ajax.readyState !== 4 && ajax.readyState !== 0)) { @@ -423,10 +422,12 @@ function manageClearButtonAvailability(enable = null) { if (selections.length) { allowRequest = false; // We'll prevent table updates from interfering with the user who has selected rows. + updateHeaderRequestStatus("stopped"); if (ajax && (ajax.readyState !== 4 && ajax.readyState !== 0)) { ajax.abort("plannedAbort"); // There may already be a previous request that hasn't completed. } } else { + if (readHeaderRequestStatus() === "stopped") updateHeaderRequestStatus("awaiting"); if (requestMissed === true) { // A scheduled AJAX update was missed. We'll execute it out of order. allowRequest = true; @@ -438,6 +439,10 @@ function manageClearButtonAvailability(enable = null) { } } +function readHeaderRequestStatus() { + return $j('#requestStatus').text().replace(/(\[|\])/g, '').trim(); +} + function updateHeaderRequestStatus(text) { $j('#requestStatus').text(" ["+text+"]"); }