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

login
register
mail settings
Submitter Alexander Plavin
Date Aug. 9, 2013, 6:57 p.m.
Message ID <a587ef25f492acec63d0.1376074662@debian-alexander.dolgopa>
Download mbox | patch
Permalink /patch/2125/
State Superseded
Commit 2ac4e89ad769282a19d4b05c533c354b787e131b
Headers show

Comments

Alexander Plavin - Aug. 9, 2013, 6:57 p.m.
# HG changeset patch
# User Alexander Plavin <alexander@plav.in>
# Date 1376071352 -14400
#      Fri Aug 09 22:02:32 2013 +0400
# Node ID a587ef25f492acec63d069337b730db7a67fcd77
# Parent  acf8517ec927c6559c48df802fcc9b98d1e40cd2
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.
Add thin border-bottom for it to the paper theme for better visual distinction.

Patch

diff -r acf8517ec927 -r a587ef25f492 mercurial/templates/static/mercurial.js
--- a/mercurial/templates/static/mercurial.js	Fri Aug 09 19:15:50 2013 +0400
+++ b/mercurial/templates/static/mercurial.js	Fri Aug 09 22:02:32 2013 +0400
@@ -385,6 +385,7 @@ 
                 format(urlFormat, {hash: lastHash, params: 'ajax=1'}),
                 'GET',
                 function onstart() {
+                    container.lastElementChild.classList.add('scroll-separator');
                 },
                 function onsuccess(xml) {
                     var html = xml.getElementsByTagName('html')[0];
diff -r acf8517ec927 -r a587ef25f492 mercurial/templates/static/style-paper.css
--- a/mercurial/templates/static/style-paper.css	Fri Aug 09 19:15:50 2013 +0400
+++ b/mercurial/templates/static/style-paper.css	Fri Aug 09 22:02:32 2013 +0400
@@ -382,3 +382,7 @@ 
 .breadcrumb a {
     color: blue;
 }
+
+.scroll-separator {
+    border-bottom: 1px solid #444 !important;
+}