update styling for unexpanded cdm; misc fixes related to collapsing

This commit is contained in:
Andrew Dolgov 2013-03-20 10:59:12 +04:00
parent c582bf25dd
commit 3ac153f1b3
3 changed files with 14 additions and 10 deletions

10
cdm.css
View File

@ -124,23 +124,23 @@ div.cdmHeader span.hlFeed {
font-style : italic; font-style : italic;
} }
div.cdmHeader { div.cdm.expanded .cdmHeader {
background : #EEF6FD; background : #EEF6FD;
} }
div.Unread div.cdmHeader { div.cdm.expanded.Unread div.cdmHeader {
background : #DCECFB; background : #DCECFB;
} }
div.Unread.Selected div.cdmHeader, div.Selected div.cdmHeader { div.cdm.expanded.Unread.Selected div.cdmHeader, div.cdm.expanded.Selected div.cdmHeader {
background : #FFEA9E; background : #FFEA9E;
} }
div.cdm.even.Unread, div.cdm.odd.Unread { div.cdm.expanded.even.Unread, div.cdm.expanded.odd.Unread {
background : white; background : white;
} }
div.cdm.even, div.cdm.odd { div.cdm.expanded.even, div.cdm.expanded.odd {
background : #f9f9f9; background : #f9f9f9;
} }

View File

@ -517,7 +517,9 @@ class Feeds extends Handler_Protected {
$mouseover_attrs = "onmouseover='postMouseIn($id)' $mouseover_attrs = "onmouseover='postMouseIn($id)'
onmouseout='postMouseOut($id)'"; onmouseout='postMouseOut($id)'";
$reply['content'] .= "<div class=\"cdm $class\" $expanded_class = $expand_cdm ? "expanded" : "";
$reply['content'] .= "<div class=\"cdm $expanded_class $class\"
id=\"RROW-$id\" $mouseover_attrs'>"; id=\"RROW-$id\" $mouseover_attrs'>";
$reply['content'] .= "<div class=\"cdmHeader\">"; $reply['content'] .= "<div class=\"cdmHeader\">";

View File

@ -1318,8 +1318,6 @@ function cdmCollapseArticle(event, id) {
var elem = $("CICD-" + id); var elem = $("CICD-" + id);
if (elem && row) { if (elem && row) {
row.removeClassName("Selected");
var collapse = $$("div#RROW-" + id + var collapse = $$("div#RROW-" + id +
" span[class='collapseBtn']")[0]; " span[class='collapseBtn']")[0];
@ -1344,6 +1342,8 @@ function cdmCollapseArticle(event, id) {
function cdmExpandArticle(id) { function cdmExpandArticle(id) {
try { try {
console.log("cdmExpandArticle " + id);
hideAuxDlg(); hideAuxDlg();
var elem = $("CICD-" + getActiveArticleId()); var elem = $("CICD-" + getActiveArticleId());
@ -1551,7 +1551,6 @@ function cdmClicked(event, id) {
if (!event.ctrlKey) { if (!event.ctrlKey) {
if (!getInitParam("cdm_expanded")) { if (!getInitParam("cdm_expanded")) {
if (event) Event.stop(event);
return cdmExpandArticle(id); return cdmExpandArticle(id);
} else { } else {
@ -1658,7 +1657,10 @@ function markHeadline(id, marked) {
check.attr("checked", marked); check.attr("checked", marked);
} }
if (marked)
row.addClassName("Selected"); row.addClassName("Selected");
else
row.removeClassName("Selected");
} }
} }