hgweb: bring back infinite scroll in shortlog of paper style stable
authorYuya Nishihara <yuya@tcha.org>
Thu, 07 May 2015 07:46:39 +0900
branchstable
changeset 24952 169d2470d283
parent 24950 e6e7d1cce04d
child 24957 17ba4ccd20b4
child 24958 a920abf5a592
hgweb: bring back infinite scroll in shortlog of paper style Since fdf7794be41d, column headers are wrapped by <thead> element, so the first and only <tbody> contains changelog data. I got the following error without this patch: Uncaught TypeError: Cannot read property 'lastElementChild' of null scrollHandler @ mercurial.js:375
mercurial/templates/paper/shortlog.tmpl
tests/test-hgweb-commands.t
tests/test-hgweb-empty.t
--- a/mercurial/templates/paper/shortlog.tmpl	Wed May 06 09:52:10 2015 -0700
+++ b/mercurial/templates/paper/shortlog.tmpl	Thu May 07 07:46:39 2015 +0900
@@ -80,7 +80,7 @@
                 var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
                 return m ? m[1] : null;
             },
-            '.bigtable > tbody:nth-of-type(2)',
+            '.bigtable > tbody',
             '<tr class="%class%">\\
             <td colspan="3" style="text-align: center;">%text%</td>\\
             </tr>'
--- a/tests/test-hgweb-commands.t	Wed May 06 09:52:10 2015 -0700
+++ b/tests/test-hgweb-commands.t	Thu May 07 07:46:39 2015 +0900
@@ -797,7 +797,7 @@
                   var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
                   return m ? m[1] : null;
               },
-              '.bigtable > tbody:nth-of-type(2)',
+              '.bigtable > tbody',
               '<tr class="%class%">\
               <td colspan="3" style="text-align: center;">%text%</td>\
               </tr>'
--- a/tests/test-hgweb-empty.t	Wed May 06 09:52:10 2015 -0700
+++ b/tests/test-hgweb-empty.t	Thu May 07 07:46:39 2015 +0900
@@ -99,7 +99,7 @@
                   var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
                   return m ? m[1] : null;
               },
-              '.bigtable > tbody:nth-of-type(2)',
+              '.bigtable > tbody',
               '<tr class="%class%">\
               <td colspan="3" style="text-align: center;">%text%</td>\
               </tr>'
@@ -210,7 +210,7 @@
                   var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
                   return m ? m[1] : null;
               },
-              '.bigtable > tbody:nth-of-type(2)',
+              '.bigtable > tbody',
               '<tr class="%class%">\
               <td colspan="3" style="text-align: center;">%text%</td>\
               </tr>'