floatingTitle-related fixes

This commit is contained in:
Andrew Dolgov 2018-12-05 16:26:53 +03:00
parent fa639df588
commit 2dac797704
7 changed files with 79 additions and 30 deletions

View File

@ -216,18 +216,36 @@ div#floatingTitle {
border-bottom-width: 1px;
background : white;
color : @default-text;
display : flex;
flex-direction : row;
flex-wrap : nowrap;
box-shadow : 0px 1px 1px -1px rgba(0,0,0,0.1);
> * {
display : table-cell;
align-self: center;
white-space : nowrap;
vertical-align : middle;
padding : 9px 5px;
padding : 4px;
}
img {
margin-right : 4px;
margin-left : 4px;
.left, .right {
display : flex;
> * {
align-self : center;
}
i.material-icons {
margin-left : 2px;
font-size : 20px;
padding : 2px;
user-select: none;
}
i.anchor {
margin-left : 0px;
padding : 0px;
color : #ccc;
}
}
span.author {
@ -284,7 +302,6 @@ div#floatingTitle {
white-space : normal;
}
.dijit,
img.score-pic {
display : none;
}

View File

@ -1175,17 +1175,36 @@ div#floatingTitle {
border-bottom-width: 1px;
background: white;
color: #555555;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
box-shadow: 0px 1px 1px -1px rgba(0, 0, 0, 0.1);
}
div#floatingTitle > * {
display: table-cell;
align-self: center;
white-space: nowrap;
vertical-align: middle;
padding: 9px 5px;
padding: 4px;
}
div#floatingTitle img {
margin-right: 4px;
margin-left: 4px;
div#floatingTitle .left,
div#floatingTitle .right {
display: flex;
}
div#floatingTitle .left > *,
div#floatingTitle .right > * {
align-self: center;
}
div#floatingTitle .left i.material-icons,
div#floatingTitle .right i.material-icons {
margin-left: 2px;
font-size: 20px;
padding: 2px;
user-select: none;
}
div#floatingTitle .left i.anchor,
div#floatingTitle .right i.anchor {
margin-left: 0px;
padding: 0px;
color: #ccc;
}
div#floatingTitle span.author {
color: #555555;
@ -1233,7 +1252,6 @@ div#floatingTitle span.titleWrap {
width: 100%;
white-space: normal;
}
div#floatingTitle .dijit,
div#floatingTitle img.score-pic {
display: none;
}

File diff suppressed because one or more lines are too long

View File

@ -233,7 +233,6 @@ define(["dojo/_base/declare"], function (declare) {
if (force || e.offsetTop + e.offsetHeight > (ctr.scrollTop + ctr.offsetHeight) ||
e.offsetTop < ctr.scrollTop) {
// expanded cdm has a 4px margin now
ctr.scrollTop = e.offsetTop;
Element.hide("floatingTitle");

View File

@ -173,15 +173,11 @@ define(["dojo/_base/declare"], function (declare) {
ft.setAttribute("data-article-id", id);
ft.innerHTML = header.innerHTML;
ft.firstChild.innerHTML = "<img class='anchor marked-pic' src='images/page_white_go.png' " +
"onclick=\"Article.cdmScrollToId(" + id + ", true)\">" + ft.firstChild.innerHTML;
ft.select(".dijitCheckBox")[0].outerHTML = "<i class=\"material-icons anchor\" onclick=\"Article.cdmScrollToId(" + id + ", true)\">expand_more</i>";
this.initFloatingMenu();
const cb = ft.select(".rchk")[0];
if (cb)
cb.parentNode.removeChild(cb);
}
if (row.hasClassName("Unread"))
@ -1005,6 +1001,7 @@ define(["dojo/_base/declare"], function (declare) {
const menu = new dijit.Menu({
id: "floatingMenu",
selector: ".hlMenuAttach",
targetNodeIds: ["floatingTitle"]
});

View File

@ -1175,17 +1175,36 @@ div#floatingTitle {
border-bottom-width: 1px;
background: white;
color: #555555;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
box-shadow: 0px 1px 1px -1px rgba(0, 0, 0, 0.1);
}
div#floatingTitle > * {
display: table-cell;
align-self: center;
white-space: nowrap;
vertical-align: middle;
padding: 9px 5px;
padding: 4px;
}
div#floatingTitle img {
margin-right: 4px;
margin-left: 4px;
div#floatingTitle .left,
div#floatingTitle .right {
display: flex;
}
div#floatingTitle .left > *,
div#floatingTitle .right > * {
align-self: center;
}
div#floatingTitle .left i.material-icons,
div#floatingTitle .right i.material-icons {
margin-left: 2px;
font-size: 20px;
padding: 2px;
user-select: none;
}
div#floatingTitle .left i.anchor,
div#floatingTitle .right i.anchor {
margin-left: 0px;
padding: 0px;
color: #ccc;
}
div#floatingTitle span.author {
color: #555555;
@ -1233,7 +1252,6 @@ div#floatingTitle span.titleWrap {
width: 100%;
white-space: normal;
}
div#floatingTitle .dijit,
div#floatingTitle img.score-pic {
display: none;
}

File diff suppressed because one or more lines are too long