changeset 24952:169d2470d283 stable

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
author Yuya Nishihara <yuya@tcha.org>
date Thu, 07 May 2015 07:46:39 +0900
parents e6e7d1cce04d
children 17ba4ccd20b4 a920abf5a592
files mercurial/templates/paper/shortlog.tmpl tests/test-hgweb-commands.t tests/test-hgweb-empty.t
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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>'