From 7f2e97f0d2af923b49ae37891895c9967df2d511 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 29 Feb 2012 11:02:34 -0800 Subject: [PATCH] Fix AJAX loading indicator in Chrome --- adminer/static/functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 0a17550e..42f0b64f 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -199,7 +199,7 @@ function bodyKeydown(event, button) { if (ajaxXmlhttp.abort) { ajaxXmlhttp.abort(); } - document.body.className = document.body.className.replace(/ loading/, ''); + document.body.className = document.body.className.replace(/ loading/g, ''); onblur = function () { }; if (originalFavicon) { replaceFavicon(originalFavicon); @@ -360,7 +360,7 @@ function ajaxSend(url, data, popState, noscroll) { scrollTo(0, 0); } setHtml('content', (xmlhttp.status ? xmlhttp.responseText : '

' + noResponse)); - document.body.className = document.body.className.replace(/ loading/, ''); + document.body.className = document.body.className.replace(/ loading/g, ''); var content = document.getElementById('content'); var scripts = content.getElementsByTagName('script'); var length = scripts.length; // required to avoid infinite loop