Patchwork [20,of,20] paper: use ajaxScrollInit in shortlog

login
register
mail settings
Submitter Alexander Plavin
Date Aug. 9, 2013, 6:57 p.m.
Message ID <561893ce075493733c2f.1376074665@debian-alexander.dolgopa>
Download mbox | patch
Permalink /patch/2126/
State Changes Requested
Headers show

Comments

Alexander Plavin - Aug. 9, 2013, 6:57 p.m.
# HG changeset patch
# User Alexander Plavin <alexander@plav.in>
# Date 1376072224 -14400
#      Fri Aug 09 22:17:04 2013 +0400
# Node ID 561893ce075493733c2f3be8088226c7cced34de
# Parent  e9201431f36ecd514a6be403c96b49dd02572082
paper: use ajaxScrollInit in shortlog

This is just calling ajaxScrollInit in the HTML page template,
the shortlogmessage is added separarely for convenience.

Patch

diff -r e9201431f36e -r 561893ce0754 mercurial/templates/paper/map
--- a/mercurial/templates/paper/map	Fri Aug 09 22:05:27 2013 +0400
+++ b/mercurial/templates/paper/map	Fri Aug 09 22:17:04 2013 +0400
@@ -12,6 +12,9 @@ 
     <lasthash>{oldestentry%"{node|short}"}</lasthash>
   </shortlog>'
 shortlogentry = shortlogentry.tmpl
+shortlogmessage = '<tr class="%class%">\
+    <td colspan="3" style="text-align: center;">%text%</td>\
+  </tr>'
 graph = graph.tmpl
 help = help.tmpl
 helptopics = helptopics.tmpl
diff -r e9201431f36e -r 561893ce0754 mercurial/templates/paper/shortlog.tmpl
--- a/mercurial/templates/paper/shortlog.tmpl	Fri Aug 09 22:05:27 2013 +0400
+++ b/mercurial/templates/paper/shortlog.tmpl	Fri Aug 09 22:17:04 2013 +0400
@@ -71,6 +71,15 @@ 
 | rev {rev}: {changenav%navshort}
 </div>
 
+<script type="text/javascript">
+    ajaxScrollInit(
+            '{url|urlescape}shortlog/%hash%/?%params%',
+            "{oldestentry%'{node|short}'}",
+            document.querySelector('.bigtable > tbody:nth-of-type(2)'),
+            '{shortlogmessage}'
+    );
+</script>
+
 </div>
 </div>