From e2ccbfab0a8e734df65ad89f817e0b8e10a3481c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 9 Aug 2007 09:23:48 +0100 Subject: [PATCH] CDM tweaks, mark article as unread when using 'v' in CDM --- functions.js | 8 +++++++ functions.php | 24 ++++++++++++-------- modules/backend-rpc.php | 2 +- tt-rss.css | 49 +++++++++++++++++++++++++++++++---------- 4 files changed, 61 insertions(+), 22 deletions(-) diff --git a/functions.js b/functions.js index d2e0c016..a6aa133e 100644 --- a/functions.js +++ b/functions.js @@ -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); + } + } } } diff --git a/functions.php b/functions.php index 7ca93956..6a55bdc8 100644 --- a/functions.php +++ b/functions.php @@ -3943,13 +3943,16 @@ print "
" . $line["content_preview"] . "

"; - print "
"; + print "
"; - print "$marked_pic"; + /* print "
Star it: $marked_pic
"; */ - print ""; + print "
$marked_pic "; + $tags = get_article_tags($link, $id); $tags_str = ""; @@ -3962,16 +3965,19 @@ $tags_str = preg_replace("/, $/", "", $tags_str); if ($tags_str == "") $tags_str = "no tags"; - - print " $tags_str "; + + print "Tags: $tags_str (+)"; - print "
"; + print ""; -# print "
-# Toggle unread
"; + print "Toggle: + Unread"; + print "
"; print ""; } diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 868d4644..3ca47137 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -210,7 +210,7 @@ if (db_num_rows($result) == 1) { $link = strip_tags(db_fetch_result($result, 0, "link")); - print "$link"; + print "$link$id"; } else { print "Article not found"; } diff --git a/tt-rss.css b/tt-rss.css index 5544e3cb..b9c3e374 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -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 { -- 2.39.5