Mercurial > public > mercurial-scm > hg-stable
diff tests/test-hgweb-empty.t @ 19781:74564c90026b
hgweb: make infinite scroll handling more generic and extensible
Namely, this allows the next page pointer to be not only revision hash given
in page code, but also any value computed from the value for previous page.
author | Alexander Plavin <alexander@plav.in> |
---|---|
date | Sun, 22 Sep 2013 14:18:23 +0400 |
parents | da3808bcfbfa |
children | 1c2a309bba4f |
line wrap: on
line diff
--- a/tests/test-hgweb-empty.t Fri Sep 06 13:30:59 2013 +0400 +++ b/tests/test-hgweb-empty.t Sun Sep 22 14:18:23 2013 +0400 @@ -92,9 +92,12 @@ <script type="text/javascript"> ajaxScrollInit( - '/shortlog/%hash%', + '/shortlog/%next%', '', <!-- NEXTHASH - /'(\w+)', <!-- NEXTHASH/, + function (htmlText, previousVal) { + var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/); + return m ? m[1] : null; + }, '.bigtable > tbody:nth-of-type(2)', '<tr class="%class%">\ <td colspan="3" style="text-align: center;">%text%</td>\ @@ -199,9 +202,12 @@ <script type="text/javascript"> ajaxScrollInit( - '/shortlog/%hash%', + '/shortlog/%next%', '', <!-- NEXTHASH - /'(\w+)', <!-- NEXTHASH/, + function (htmlText, previousVal) { + var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/); + return m ? m[1] : null; + }, '.bigtable > tbody:nth-of-type(2)', '<tr class="%class%">\ <td colspan="3" style="text-align: center;">%text%</td>\