1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-24 15:12:51 +02:00

Move loading indicator to the right, add CSS cursor: progress

This commit is contained in:
Jakub Vrana
2012-02-17 12:13:11 -08:00
parent 7e97fcd0b9
commit 70994abcbd
5 changed files with 11 additions and 9 deletions

View File

@@ -199,7 +199,7 @@ function bodyKeydown(event, button) {
if (ajaxXmlhttp.abort) {
ajaxXmlhttp.abort();
}
setHtml('loader', '');
document.body.className = document.body.className.replace(/ loading/, '');
onblur = function () { };
if (originalFavicon) {
replaceFavicon(originalFavicon);
@@ -334,9 +334,9 @@ function ajaxSend(url, data, popState, noscroll) {
if (!originalFavicon) {
originalFavicon = (document.getElementById('favicon') || {}).href;
}
replaceFavicon('../adminer/static/loader.gif');
replaceFavicon(document.getElementById('loader').firstChild.src);
};
setHtml('loader', '<img src="../adminer/static/loader.gif" alt="">');
document.body.className += ' loading';
ajaxXmlhttp = ajax(url, function (xmlhttp) {
if (!xmlhttp.aborted && currentState == ajaxState) {
var title = xmlhttp.getResponseHeader('X-AJAX-Title');
@@ -360,6 +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/, '');
var content = document.getElementById('content');
var scripts = content.getElementsByTagName('script');
var length = scripts.length; // required to avoid infinite loop