]> git.wh0rd.org Git - tt-rss.git/commitdiff
update styling for unexpanded cdm; misc fixes related to collapsing
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 20 Mar 2013 06:59:12 +0000 (10:59 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 20 Mar 2013 06:59:12 +0000 (10:59 +0400)
cdm.css
classes/feeds.php
js/viewfeed.js

diff --git a/cdm.css b/cdm.css
index bcba40538d56e81727f3c86b48ba6ee005049315..6fc5b06313d1d48e3664842decb1ce23dc9f638f 100644 (file)
--- 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;
 }
 
index 0d5d8c8a00363ab269b8ad4c202993b34948d374..c464303c122bcd6bb1badd398fc472af182583af 100644 (file)
@@ -517,7 +517,9 @@ class Feeds extends Handler_Protected {
                                        $mouseover_attrs = "onmouseover='postMouseIn($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'>";
 
                                        $reply['content'] .= "<div class=\"cdmHeader\">";
index 584fff5748757889e35846fb27a701d345062370..2555215ce9268b57f8af554659fb98fdb0813a9b 100644 (file)
@@ -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");
        }
 }