[PATCH 1 of 4] hgweb: add CSS class to the last entry on a page

Alexander Plavin alexander at plav.in
Thu Sep 19 18:31:50 UTC 2013


# HG changeset patch
# User Alexander Plavin <alexander at plav.in>
# Date 1378459858 -14400
#      Fri Sep 06 13:30:58 2013 +0400
# Node ID 39146a2b5a6edbd51468cb27cb89a33f47764d0f
# Parent  3f23cc5f52e790d0a02fda11b0db2998a6ecdf65
hgweb: add CSS class to the last entry on a page

The entry which was last before an ajax load now has a specific CSS class
for easier styling.

diff -r 3f23cc5f52e7 -r 39146a2b5a6e mercurial/templates/static/mercurial.js
--- a/mercurial/templates/static/mercurial.js	Fri Sep 06 13:30:58 2013 +0400
+++ b/mercurial/templates/static/mercurial.js	Fri Sep 06 13:30:58 2013 +0400
@@ -367,6 +367,7 @@
         if (scrollHeight - (scrollTop + clientHeight) < 50) {
             updateInitiated = true;
             removeByClassName('scroll-loading-error');
+            container.lastElementChild.classList.add('scroll-separator');
 
             if (!nextHash) {
                 var message = {


More information about the Mercurial-devel mailing list