From patchwork Thu Sep 19 12:37:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3, of, 3] hgweb: show message when an error occured during ajax loading From: Alexander Plavin X-Patchwork-Id: 2537 Message-Id: <3f23cc5f52e790d0a02f.1379594260@debian-alexander.dolgopa> To: mercurial-devel@selenic.com Date: Thu, 19 Sep 2013 16:37:40 +0400 # HG changeset patch # User Alexander Plavin # Date 1378459858 -14400 # Fri Sep 06 13:30:58 2013 +0400 # Node ID 3f23cc5f52e790d0a02fda11b0db2998a6ecdf65 # Parent 83b62633254130572dcbe48b094645b67aa5ca20 hgweb: show message when an error occured during ajax loading diff -r 83b626332541 -r 3f23cc5f52e7 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 @@ -366,6 +366,7 @@ if (scrollHeight - (scrollTop + clientHeight) < 50) { updateInitiated = true; + removeByClassName('scroll-loading-error'); if (!nextHash) { var message = { @@ -400,6 +401,11 @@ process_dates(); }, function onerror(errorText) { + var message = { + class: 'scroll-loading-error', + text: 'Error: ' + errorText + }; + appendFormatHTML(container, messageFormat, message); }, function oncomplete() { removeByClassName('scroll-loading');