]> git.joonet.de Git - adminer.git/commitdiff
Fix AJAX loading indicator in Chrome
authorJakub Vrana <jakubv@fb.com>
Wed, 29 Feb 2012 19:02:34 +0000 (11:02 -0800)
committerJakub Vrana <jakubv@fb.com>
Wed, 29 Feb 2012 19:02:34 +0000 (11:02 -0800)
adminer/static/functions.js

index 0a17550edb5b4a88cd364fc332b02936f680b8b9..42f0b64f6b190d69684d54486ea5baefef1b5d2d 100644 (file)
@@ -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 : '<p class="error">' + 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