From 62b800b47cadf623dfd0178554a1d7251f5b979e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 13 Nov 2010 01:41:18 +0300 Subject: [PATCH] cdm: bring back updated/new pic --- cdm.css | 12 ++++++++++-- functions.php | 16 +++++++++++----- viewfeed.js | 16 ++++++++++++++++ 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/cdm.css b/cdm.css index 8681832b..ed35d762 100644 --- a/cdm.css +++ b/cdm.css @@ -15,10 +15,18 @@ div.cdmHeader input { margin-right : 5px; } +div.updPic { + width : 25px; + display : inline-block; + text-align : center; +} + +div.updPic img { + vertical-align : middle; +} + div.cdmHeader img, div.cdmFooter img { margin : 0px 2px 0px 2px; - width : 16px; - height : 16px; } div.cdmContent { diff --git a/functions.php b/functions.php index b952a5ba..9df02f83 100644 --- a/functions.php +++ b/functions.php @@ -5342,7 +5342,9 @@ onclick=\"viewfeed($feed_id)\">$feed_icon_img"; } print ""; - + + print "
$update_pic
"; + print ""; @@ -5416,10 +5418,14 @@ } } - $article_content = sanitize_rss($link, $line["content_preview"], - false, false, $feed_site_url); +# if ($expand_cdm) { + $article_content = sanitize_rss($link, $line["content_preview"], + false, false, $feed_site_url); - if (!$article_content) $article_content = " "; + if (!$article_content) $article_content = " "; +# } else { +# $article_content = ''; +# } print "
"; if ($line['note']) { @@ -5427,7 +5433,7 @@ } print "
"; - print $article_content; + print "$article_content"; $tmp_result = db_query($link, "SELECT always_display_enclosures FROM ttrss_feeds WHERE id = ". diff --git a/viewfeed.js b/viewfeed.js index 07fe859f..a5654eb4 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -1976,6 +1976,14 @@ function cdmExpandArticle(id) { var elem = $("CICD-" + active_post_id); + var upd_img_pic = $("FUPDPIC-" + id); + + if (upd_img_pic && (upd_img_pic.src.match("updated.png") || + upd_img_pic.src.match("fresh_sign.png"))) { + + upd_img_pic.src = "images/blank_icon.gif"; + } + if (id == active_post_id && Element.visible(elem)) return true; @@ -2339,6 +2347,14 @@ function cdmClicked(event, id) { if (elem) elem.className = elem.className.replace("Unread", ""); + var upd_img_pic = $("FUPDPIC-" + id); + + if (upd_img_pic && (upd_img_pic.src.match("updated.png") || + upd_img_pic.src.match("fresh_sign.png"))) { + + upd_img_pic.src = "images/blank_icon.gif"; + } + var query = "?op=rpc&subop=catchupSelected" + "&cmode=0&ids=" + param_escape(id); -- 2.39.5