diff mercurial/templates/gitweb/graph.tmpl @ 20254:3896debf0a11

hgweb: infinite scroll support for gitweb style
author Takumi IINO <trot.thunder@gmail.com>
date Wed, 08 Jan 2014 00:47:43 +0900
parents 9409aeaafdc1
children dd89304687a3
line wrap: on
line diff
--- a/mercurial/templates/gitweb/graph.tmpl	Wed Jan 08 00:35:03 2014 +0900
+++ b/mercurial/templates/gitweb/graph.tmpl	Wed Jan 08 00:47:43 2014 +0900
@@ -108,4 +108,15 @@
 | {changenav%navgraph}
 </div>
 
+<script type="text/javascript">
+    ajaxScrollInit(
+            '{url|urlescape}graph/{rev}?revcount=%next%&style={style}',
+            {revcount}+60,
+            function (htmlText, previousVal) \{ return previousVal + 60; },
+            '#wrapper',
+            '<div class="%class%" style="text-align: center;">%text%</div>',
+            'graph'
+    );
+</script>
+
 {footer}