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

login
register
mail settings
Submitter Alexander Plavin
Date Sept. 19, 2013, 6:31 p.m.
Message ID <39146a2b5a6edbd51468.1379615510@debian-alexander.dolgopa>
Download mbox | patch
Permalink /patch/2540/
State Accepted
Headers show

Comments

Alexander Plavin - Sept. 19, 2013, 6:31 p.m.
# HG changeset patch
# User Alexander Plavin <alexander@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.

Patch

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 = {