]> git.wh0rd.org Git - tt-rss.git/commitdiff
CDM tweaks, mark article as unread when using 'v' in CDM
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 9 Aug 2007 08:23:48 +0000 (09:23 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 9 Aug 2007 08:23:48 +0000 (09:23 +0100)
functions.js
functions.php
modules/backend-rpc.php
tt-rss.css

index d2e0c016db8d04b9ad85cfe37fbfce26b6948e8b..a6aa133efaa3865c4750cea95860f3edaeddac7c 100644 (file)
@@ -70,9 +70,17 @@ function open_article_callback() {
 
                        if (xmlhttp_rpc.responseXML) {
                                var link = xmlhttp_rpc.responseXML.getElementsByTagName("link")[0];
+                               var id = xmlhttp_rpc.responseXML.getElementsByTagName("id")[0];
 
                                if (link) {
                                        window.open(link.firstChild.nodeValue, "_blank");
+
+                                       if (id) {
+                                               id = id.firstChild.nodeValue;
+                                               if (!document.getElementById("headlinesList")) {
+                                                       window.setTimeout("toggleUnread(" + id + ", 0)", 100);
+                                               }
+                                       }
                                }
                        }
 
index 7ca93956dca3afd68fa5956b1a0710f87b308bbc..6a55bdc8e8e7e3df06a58428985b843517a00f66 100644 (file)
 
                                        print "<div class=\"cdmContent\">" . $line["content_preview"] . "</div><br clear=\"all\">";
 
-                                       print "<div class=\"cdmFooter\">";
+                                       print "<div class=\"cdmFooter\"><span class='s0'>";
 
-                                       print "$marked_pic";
+                                       /* print "<div class=\"markedPic\">Star it: $marked_pic</div>"; */
 
-                                       print "<input type=\"checkbox\" onclick=\"toggleSelectRowById(this, 
+                                       print __("Select:").
+                                                       " <input type=\"checkbox\" onclick=\"toggleSelectRowById(this, 
                                                        'RROW-$id')\" class=\"feedCheckBox\" id=\"RCHK-$id\">";
 
+                                       print "</span><span class='s1'>$marked_pic</span> ";
+
                                        $tags = get_article_tags($link, $id);
 
                                        $tags_str = "";
                                        $tags_str = preg_replace("/, $/", "", $tags_str);
 
                                        if ($tags_str == "") $tags_str = "no tags";
-       
-                                       print " $tags_str <a title=\"Edit tags for this article\" 
+
+//                                     print "<img src='images/tag.png' class='markedPic'>";
+
+                                       print "<span class='s1'>Tags: $tags_str <a title=\"Edit tags for this article\" 
                                                        href=\"javascript:editArticleTags($id, $feed_id, true)\">(+)</a>";
 
-                                       print "</div>";
+                                       print "</span>";
 
-#                                      print "<div align=\"center\"><a class=\"cdmToggleLink\"
-#                                                      href=\"javascript:toggleUnread($id)\">
-#                                                      Toggle unread</a></div>";
+                                       print "<span class='s2'>Toggle: <a class=\"cdmToggleLink\"
+                                                       href=\"javascript:toggleUnread($id)\">
+                                                       Unread</a></span>";
 
+                                       print "</div>";
                                        print "</div>"; 
 
                                }                               
index 868d464451d69991e3e099c4dcbf1806b0f7a77e..3ca471377c619ce621f2f67b71cd565f22bf928d 100644 (file)
 
                        if (db_num_rows($result) == 1) {
                                $link = strip_tags(db_fetch_result($result, 0, "link"));
-                               print "<rpc-reply><link>$link</link></rpc-reply>";
+                               print "<rpc-reply><link>$link</link><id>$id</id></rpc-reply>";
                        } else {
                                print "<rpc-reply><error>Article not found</error></rpc-reply>";
                        }
index 5544e3cb0f3e9a91b008cf0120ffd5fbbc9b0c60..b9c3e3748d5fdc2fcce1f0d4ef2a1c90887465d0 100644 (file)
@@ -845,30 +845,30 @@ td.hlFeed {
        text-align : right;
 }
 
-div.cdmArticle:hover {
+/* div.cdmArticle:hover {
        background-color : white;
-}
+} */
 
 div.cdmArticle {
-       border-color : #c0c0c0;
+       border-color : #a0a0a0;
        border-width : 0px 0px 1px 0px;
        border-style : solid;
        background-color : #fafafa;
        margin : 0px;
-       padding : 10px;
+       /* padding : 10px; */
 }
 
-div.cdmArticleUnread:hover {
+/* div.cdmArticleUnread:hover {
        background-color : white;
-}
+} */
 
 div.cdmArticleUnread {
-       border-color : #c0c0c0;
+       border-color : #a0a0a0;
        border-width : 0px 0px 1px 0px;
        border-style : solid;
        background-color : #fafeff;
        margin : 0px;
-       padding : 10px;
+       /* padding : 10px; */
 }
 
 div.cdmArticleSelected, div.cdmArticleUnreadSelected {
@@ -886,7 +886,7 @@ div.cdmArticleUnreadSelected div.cdmHeader a.title {
 }
 
 div.cdmHeader {
-       padding-bottom : 5px;
+       padding : 5px 5px 10px 5px;
 }
 
 div.cdmArticleUnread div.cdmHeader a {
@@ -895,16 +895,40 @@ div.cdmArticleUnread div.cdmHeader a {
 
 div.cdmFooter {
        font-size : 9pt;
+       color : black;
+       padding : 5px;
        color : gray;
-       padding-top : 5px;
+       background-color : white;
+       border-width : 1px 0px 0px 0px;
+       border-color : #c0c0c0;
+       border-style : dotted;
+}
+
+div.cdmFooter span.s0 {
+       border-width : 0px 1px 0px 0px;
+       border-color : #c0c0c0;
+       border-style : dotted;
+       padding : 0px 10px 0px 0px;
+}
+
+div.cdmFooter span.s1 {
+       border-width : 0px 1px 0px 0px;
+       border-color : #c0c0c0;
+       border-style : dotted;
+       padding : 0px 10px 0px 10px;
+}
+
+div.cdmFooter span.s2 {
+       padding : 0px 10px 0px 10px;
 }
 
 div.cdmFooter img.markedPic {
        width : 16px;
        height : 16px;
-       float : right;
+       vertical-align : middle;
 }
 
+
 div.cdmHeader div.articleUpdated {
        float : right;
 }
@@ -923,7 +947,8 @@ div.cdmHeader a:hover {
 }
 
 div.cdmContent {
-       margin-bottom : 5px;
+       margin : 5px 15px 0px 15px;
+
 }
 
 a.warning {