From 1b27261c8452a80f3cf54fd78c01e61c42757fcb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 4 Feb 2009 10:37:48 +0300 Subject: [PATCH] implement view_offline() --- offline.js | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/offline.js b/offline.js index 58c2377c..a4670214 100644 --- a/offline.js +++ b/offline.js @@ -4,12 +4,45 @@ function view_offline(id, feed_id) { enableHotkeys(); showArticleInHeadlines(id); - if (db) { - db.execute("UPDATE articles SET unread = 0 WHERE id = ?", [id]); - } + db.execute("UPDATE articles SET unread = 0 WHERE id = ?", [id]); + + var rs = db.execute("SELECT * FROM articles WHERE id = ?", [id]); + + if (rs.isValidRow()) { + + var tmp = "
"; + + tmp += "
"; + + tmp += "
"+rs.fieldByName("updated")+"
"; + + if (rs.fieldByName("link") != "") { + tmp += "
" + + rs.fieldByName("title") + "
"; + } else { + tmp += "
" + rs.fieldByName("title") + "
"; + } + + tmp += "
"+ + "Tags"; + tmp += rs.fieldByName("tags"); + tmp += "
"; + + tmp += "
fixme-comments
"; - render_article("FIXME"); - update_local_feedlist_counters(); + tmp += "
"; + + tmp += "
" + tmp += rs.fieldByName("content"); + tmp += "
"; + + tmp += "
"; + + render_article(tmp); + update_local_feedlist_counters(); + } return false; -- 2.39.5