[PATCH 2 of 2] paper: call ajaxScrollInit in shortlog
Alexander Plavin
alexander at plav.in
Wed Sep 18 18:52:25 UTC 2013
# HG changeset patch
# User Alexander Plavin <alexander at plav.in>
# Date 1378459857 -14400
# Fri Sep 06 13:30:57 2013 +0400
# Node ID 0032f7b54b7bb23b35574f774d37ba763a8e5199
# Parent 0a792989e90204557812427f02ba2f176f08d8c1
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.
diff -r 0a792989e902 -r 0032f7b54b7b mercurial/templates/paper/shortlog.tmpl
--- 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
@@ -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 0a792989e902 -r 0032f7b54b7b tests/test-hgweb-commands.t
--- 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>
diff -r 0a792989e902 -r 0032f7b54b7b tests/test-hgweb-empty.t
--- 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>
More information about the Mercurial-devel
mailing list