[PATCH 15 of 20] hgweb: add ajaxy loaded entries to the DOM tree

Alexander Plavin alexander at plav.in
Fri Aug 9 13:57:40 CDT 2013


# HG changeset patch
# User Alexander Plavin <alexander at plav.in>
# Date 1376061334 -14400
#      Fri Aug 09 19:15:34 2013 +0400
# Node ID 749f5ba8c323d89b3f856f7b8812653e18f41907
# Parent  f28ca736646cf582ef71b518b995a1d63c40849a
hgweb: add ajaxy loaded entries to the DOM tree

Now the loaded entries (if response is successful) are added to the DOM tree,
i.e. actually displayed.

diff -r f28ca736646c -r 749f5ba8c323 mercurial/templates/static/mercurial.js
--- a/mercurial/templates/static/mercurial.js	Fri Aug 09 19:15:08 2013 +0400
+++ b/mercurial/templates/static/mercurial.js	Fri Aug 09 19:15:34 2013 +0400
@@ -387,6 +387,11 @@
                 function onstart() {
                 },
                 function onsuccess(xml) {
+                    var html = xml.getElementsByTagName('html')[0];
+                    html = html.firstChild.nodeValue;
+                    appendHTML(container, html);
+
+                    lastHash = xml.getElementsByTagName('lasthash')[0].firstChild.nodeValue;
                 },
                 function onerror(errorText) {
                 },


More information about the Mercurial-devel mailing list