paper: call ajaxScrollInit in shortlog
authorAlexander Plavin <alexander@plav.in>
Fri, 06 Sep 2013 13:30:57 +0400
changeset 19747 da3808bcfbfa
parent 19746 9ad7dd9574a9
child 19750 d4ed26beae0e
paper: call ajaxScrollInit in shortlog This just calls ajaxScrollInit at the shortlog page template with all needed agruments. So, infinite scrolling is working now there.
mercurial/templates/paper/shortlog.tmpl
tests/test-hgweb-commands.t
tests/test-hgweb-empty.t
--- a/mercurial/templates/paper/shortlog.tmpl	Wed Sep 18 22:44:12 2013 +0400
+++ b/mercurial/templates/paper/shortlog.tmpl	Fri Sep 06 13:30:57 2013 +0400
@@ -72,6 +72,18 @@
 | rev {rev}: {changenav%navshort}
 </div>
 
+<script type="text/javascript">
+    ajaxScrollInit(
+            '{url|urlescape}shortlog/%hash%',
+            '{nextentry%"{node}"}', <!-- NEXTHASH
+            /'(\w+)', <!-- NEXTHASH/,
+            '.bigtable > tbody:nth-of-type(2)',
+            '<tr class="%class%">\
+            <td colspan="3" style="text-align: center;">%text%</td>\
+            </tr>'
+    );
+</script>
+
 </div>
 </div>
 
--- a/tests/test-hgweb-commands.t	Wed Sep 18 22:44:12 2013 +0400
+++ b/tests/test-hgweb-commands.t	Fri Sep 06 13:30:57 2013 +0400
@@ -305,6 +305,18 @@
   | rev 3: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a> 
   </div>
   
+  <script type="text/javascript">
+      ajaxScrollInit(
+              '/shortlog/%hash%',
+              '', <!-- NEXTHASH
+              /'(\w+)', <!-- NEXTHASH/,
+              '.bigtable > tbody:nth-of-type(2)',
+              '<tr class="%class%">\
+              <td colspan="3" style="text-align: center;">%text%</td>\
+              </tr>'
+      );
+  </script>
+  
   </div>
   </div>
   
--- a/tests/test-hgweb-empty.t	Wed Sep 18 22:44:12 2013 +0400
+++ b/tests/test-hgweb-empty.t	Fri Sep 06 13:30:57 2013 +0400
@@ -90,6 +90,18 @@
   | rev -1: 
   </div>
   
+  <script type="text/javascript">
+      ajaxScrollInit(
+              '/shortlog/%hash%',
+              '', <!-- NEXTHASH
+              /'(\w+)', <!-- NEXTHASH/,
+              '.bigtable > tbody:nth-of-type(2)',
+              '<tr class="%class%">\
+              <td colspan="3" style="text-align: center;">%text%</td>\
+              </tr>'
+      );
+  </script>
+  
   </div>
   </div>
   
@@ -185,6 +197,18 @@
   | rev -1: 
   </div>
   
+  <script type="text/javascript">
+      ajaxScrollInit(
+              '/shortlog/%hash%',
+              '', <!-- NEXTHASH
+              /'(\w+)', <!-- NEXTHASH/,
+              '.bigtable > tbody:nth-of-type(2)',
+              '<tr class="%class%">\
+              <td colspan="3" style="text-align: center;">%text%</td>\
+              </tr>'
+      );
+  </script>
+  
   </div>
   </div>