diff mercurial/templates/gitweb/shortlog.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/shortlog.tmpl	Wed Jan 08 00:35:03 2014 +0900
+++ b/mercurial/templates/gitweb/shortlog.tmpl	Wed Jan 08 00:47:43 2014 +0900
@@ -32,7 +32,7 @@
 </div>
 
 <div class="title">&nbsp;</div>
-<table cellspacing="0">
+<table class="shortlogtable" cellspacing="0">
 {entries%shortlogentry}
 </table>
 
@@ -40,4 +40,19 @@
 {changenav%navshort}
 </div>
 
+<script type="text/javascript">
+    ajaxScrollInit(
+            '{url|urlescape}shortlog/%next%{sessionvars%urlparameter}',
+            '{nextentry%"{node}"}', <!-- NEXTHASH
+            function (htmlText, previousVal) \{
+                var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
+                return m ? m[1] : null;
+            },
+            '.shortlogtable > tbody:nth-of-type(1)',
+            '<tr class="%class%">\
+            <td colspan="4" style="text-align: center;">%text%</td>\
+            </tr>'
+    );
+</script>
+
 {footer}