[PATCH 5 of 9 V2] hgweb: add loading indicator for ajax scrolling
Alexander Plavin
alexander at plav.in
Sat Aug 17 17:33:10 CDT 2013
# HG changeset patch
# User Alexander Plavin <alexander at plav.in>
# Date 1376765071 -14400
# Sat Aug 17 22:44:31 2013 +0400
# Node ID 8bea23e0f3b00c7ca8582c6f2970adabc6dab2d1
# Parent e80fe9b70c6fcf6a5d2bd540782574b723d56806
hgweb: add loading indicator for ajax scrolling
diff -r e80fe9b70c6f -r 8bea23e0f3b0 mercurial/templates/static/mercurial.js
--- a/mercurial/templates/static/mercurial.js Sat Aug 17 19:51:03 2013 +0400
+++ b/mercurial/templates/static/mercurial.js Sat Aug 17 22:44:31 2013 +0400
@@ -381,6 +381,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);
@@ -396,6 +401,7 @@
function onerror(errorText) {
},
function oncomplete() {
+ removeByClassName('scroll-loading');
updateInitiated = false;
scrollHandler();
}
More information about the Mercurial-devel
mailing list