From 851ce4146afc5b5090a3d6732d9200075b104337 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 4 Feb 2009 23:13:21 +0300 Subject: [PATCH] offline: display feed names in vfeed headlines --- offline.js | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/offline.js b/offline.js index bb81acf7..6d0b05a1 100644 --- a/offline.js +++ b/offline.js @@ -219,7 +219,9 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off offset_qpart = ""; } - var query = "SELECT * FROM articles WHERE " + + var query = "SELECT *,feeds.title AS feed_title "+ + "FROM articles,feeds WHERE " + + "feed_id = feeds.id AND " + strategy_qpart + " AND " + mode_qpart + " ORDER BY updated DESC "+ @@ -230,11 +232,19 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off var line_num = offset*30; + var real_feed_id = feed_id; + while (rs.isValidRow()) { var id = rs.fieldByName("id"); var feed_id = rs.fieldByName("feed_id"); + var entry_feed_title = false; + + if (real_feed_id < 0) { + entry_feed_title = rs.fieldByName("feed_title"); + } + var marked_pic; var row_class = (line_num % 2) ? "even" : "odd"; @@ -273,7 +283,7 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off tmp += ""; - tmp += ""+ rs.fieldByName("title"); @@ -281,7 +291,13 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off tmp += " - "+content_preview+""; tmp += ""; - + + if (entry_feed_title) { + tmp += " "+ + "("+entry_feed_title+")"; + } + tmp += ""; tmp += ""+ @@ -314,6 +330,12 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off ""+rs.fieldByName("title")+""; + + if (entry_feed_title) { + tmp += " ("+entry_feed_title+")"; + } + tmp += ""; tmp += "