# HG changeset patch # User Alexander Plavin # Date 2013-09-06 09:30:58 # Node ID 54981b8994066c90e6500f4b34e33b30fc455cae # Parent 00b9f6aab761457b6a9b709bb13b626dd89104c4 hgweb: show message when an error occured during ajax loading diff --git a/mercurial/templates/static/mercurial.js b/mercurial/templates/static/mercurial.js --- a/mercurial/templates/static/mercurial.js +++ b/mercurial/templates/static/mercurial.js @@ -366,6 +366,7 @@ function ajaxScrollInit(urlFormat, if (scrollHeight - (scrollTop + clientHeight) < 50) { updateInitiated = true; + removeByClassName('scroll-loading-error'); if (!nextHash) { var message = { @@ -400,6 +401,11 @@ function ajaxScrollInit(urlFormat, process_dates(); }, function onerror(errorText) { + var message = { + class: 'scroll-loading-error', + text: 'Error: ' + errorText + }; + appendFormatHTML(container, messageFormat, message); }, function oncomplete() { removeByClassName('scroll-loading');