Mercurial > hg
changeset 31784:02eb52e9d413
hgweb: rely on a specific class to change cursor type in followlines UI
The previous CSS rule would also apply in pages where followlines UI was not
available (e.g. "changeset" view at /rev/<node>/). We insert a
"followlines-select" class in JavaScript on actually selectable lines and
restrict the CSS selector to use it.
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Mon, 03 Apr 2017 09:58:36 +0200 |
parents | 70377de005a0 |
children | d15c9feb4399 |
files | mercurial/templates/static/linerangelog.js mercurial/templates/static/style-paper.css |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templates/static/linerangelog.js Mon Apr 03 09:40:25 2017 +0200 +++ b/mercurial/templates/static/linerangelog.js Mon Apr 03 09:58:36 2017 +0200 @@ -22,6 +22,11 @@ sourcelines.children, function(x) { return x.tagName === 'SPAN' }); + // add a "followlines-select" class to change cursor type in CSS + for (var i = 0; i < spans.length; i++) { + spans[i].classList.add('followlines-select'); + } + var lineSelectedCSSClass = 'followlines-selected'; //** add CSS class on <span> element in `from`-`to` line range */
--- a/mercurial/templates/static/style-paper.css Mon Apr 03 09:40:25 2017 +0200 +++ b/mercurial/templates/static/style-paper.css Mon Apr 03 09:58:36 2017 +0200 @@ -280,7 +280,7 @@ background-color: #bfdfff; } -div.overflow pre.sourcelines > span:hover { +div.overflow pre.sourcelines > span.followlines-select:hover { cursor: cell; }