Patchwork [4,of,6,V2] paper: call ajaxScrollInit in shortlog

login
register
mail settings
Submitter Alexander Plavin
Date Aug. 17, 2013, 10:28 p.m.
Message ID <0258e9b301d3d93c820e.1376778539@debian-alexander.dolgopa>
Download mbox | patch
Permalink /patch/2207/
State Superseded
Commit da3808bcfbfa9467b2dee82ba51f398f1c371fac
Headers show

Comments

Alexander Plavin - Aug. 17, 2013, 10:28 p.m.
# HG changeset patch
# User Alexander Plavin <alexander@plav.in>
# Date 1376740785 -14400
#      Sat Aug 17 15:59:45 2013 +0400
# Node ID 0258e9b301d3d93c820ea640fdc3d19874d01656
# Parent  474146e53438e832a7a1b3817273569f03d25aee
paper: call ajaxScrollInit in shortlog

This just calls ajaxScrollInit at the shortlog page template with all needed
agruments. As ajaxScrollInit function is not complete at this point, actual
infinite scrolling isn't working yet. However, this allows seeing changes after
next patches in action immediately.

Patch

diff -r 474146e53438 -r 0258e9b301d3 mercurial/templates/paper/shortlog.tmpl
--- a/mercurial/templates/paper/shortlog.tmpl	Sat Aug 17 19:48:06 2013 +0400
+++ b/mercurial/templates/paper/shortlog.tmpl	Sat Aug 17 15:59:45 2013 +0400
@@ -71,6 +71,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>
 
diff -r 474146e53438 -r 0258e9b301d3 tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t	Sat Aug 17 19:48:06 2013 +0400
+++ b/tests/test-hgweb-commands.t	Sat Aug 17 15:59:45 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>
   
diff -r 474146e53438 -r 0258e9b301d3 tests/test-hgweb-empty.t
--- a/tests/test-hgweb-empty.t	Sat Aug 17 19:48:06 2013 +0400
+++ b/tests/test-hgweb-empty.t	Sat Aug 17 15:59:45 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>