changeset 19755:00b9f6aab761

hgweb: show loading indicator while an ajax request is in process
author Alexander Plavin <alexander@plav.in>
date Fri, 06 Sep 2013 13:30:58 +0400
parents c35e8805cf53
children 54981b899406
files mercurial/templates/static/mercurial.js
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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();
                 }