From 3ac153f1b3db2baac92dd3e9499992f99f580782 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Mar 2013 10:59:12 +0400 Subject: [PATCH] update styling for unexpanded cdm; misc fixes related to collapsing --- cdm.css | 10 +++++----- classes/feeds.php | 4 +++- js/viewfeed.js | 10 ++++++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/cdm.css b/cdm.css index bcba4053..6fc5b063 100644 --- a/cdm.css +++ b/cdm.css @@ -124,23 +124,23 @@ div.cdmHeader span.hlFeed { font-style : italic; } -div.cdmHeader { +div.cdm.expanded .cdmHeader { background : #EEF6FD; } -div.Unread div.cdmHeader { +div.cdm.expanded.Unread div.cdmHeader { 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; } -div.cdm.even.Unread, div.cdm.odd.Unread { +div.cdm.expanded.even.Unread, div.cdm.expanded.odd.Unread { background : white; } -div.cdm.even, div.cdm.odd { +div.cdm.expanded.even, div.cdm.expanded.odd { background : #f9f9f9; } diff --git a/classes/feeds.php b/classes/feeds.php index 0d5d8c8a..c464303c 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -517,7 +517,9 @@ class Feeds extends Handler_Protected { $mouseover_attrs = "onmouseover='postMouseIn($id)' onmouseout='postMouseOut($id)'"; - $reply['content'] .= "
"; $reply['content'] .= "
"; diff --git a/js/viewfeed.js b/js/viewfeed.js index 584fff57..2555215c 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -1318,8 +1318,6 @@ function cdmCollapseArticle(event, id) { var elem = $("CICD-" + id); if (elem && row) { - row.removeClassName("Selected"); - var collapse = $$("div#RROW-" + id + " span[class='collapseBtn']")[0]; @@ -1344,6 +1342,8 @@ function cdmCollapseArticle(event, id) { function cdmExpandArticle(id) { try { + console.log("cdmExpandArticle " + id); + hideAuxDlg(); var elem = $("CICD-" + getActiveArticleId()); @@ -1551,7 +1551,6 @@ function cdmClicked(event, id) { if (!event.ctrlKey) { if (!getInitParam("cdm_expanded")) { - if (event) Event.stop(event); return cdmExpandArticle(id); } else { @@ -1658,7 +1657,10 @@ function markHeadline(id, marked) { check.attr("checked", marked); } - row.addClassName("Selected"); + if (marked) + row.addClassName("Selected"); + else + row.removeClassName("Selected"); } } -- 2.39.5