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

login
register
mail settings
Submitter Alexander Plavin
Date Aug. 17, 2013, 10:33 p.m.
Message ID <071ef2e72dfbf110ec46.1376778786@debian-alexander.dolgopa>
Download mbox | patch
Permalink /patch/2211/
State Superseded
Commit 2ac4e89ad769282a19d4b05c533c354b787e131b
Headers show

Comments

Alexander Plavin - Aug. 17, 2013, 10:33 p.m.
# HG changeset patch
# User Alexander Plavin <alexander@plav.in>
# Date 1376765427 -14400
#      Sat Aug 17 22:50:27 2013 +0400
# Node ID 071ef2e72dfbf110ec46ddd74300b6fd390b2a48
# Parent  cc33d3be1c64be93bf38452e287a1a4a929dd97f
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.

Patch

diff -r cc33d3be1c64 -r 071ef2e72dfb mercurial/templates/static/mercurial.js
--- a/mercurial/templates/static/mercurial.js	Sat Aug 17 15:53:05 2013 +0400
+++ b/mercurial/templates/static/mercurial.js	Sat Aug 17 22:50:27 2013 +0400
@@ -355,6 +355,7 @@ 
 
         if (scrollHeight - (scrollTop + clientHeight) < 50) {
             updateInitiated = true;
+            container.lastElementChild.classList.add('scroll-separator');
 
             if (!nextHash) {
                 return;