# HG changeset patch # User Alexander Plavin # Date 1378459858 -14400 # Node ID 00b9f6aab761457b6a9b709bb13b626dd89104c4 # Parent c35e8805cf5344909b6637429bdbd7f9d37c3e27 hgweb: show loading indicator while an ajax request is in process diff -r c35e8805cf53 -r 00b9f6aab761 mercurial/templates/static/mercurial.js --- a/mercurial/templates/static/mercurial.js Fri Sep 06 13:30:58 2013 +0400 +++ b/mercurial/templates/static/mercurial.js Fri Sep 06 13:30:58 2013 +0400 @@ -380,6 +380,11 @@ format(urlFormat, {hash: nextHash}), 'GET', function onstart() { + var message = { + class: 'scroll-loading', + text: 'Loading...' + }; + appendFormatHTML(container, messageFormat, message); }, function onsuccess(htmlText) { var m = htmlText.match(nextHashRegex); @@ -397,6 +402,7 @@ function onerror(errorText) { }, function oncomplete() { + removeByClassName('scroll-loading'); updateInitiated = false; scrollHandler(); }