summaryrefslogtreecommitdiff
path: root/offline.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-02-04 10:37:48 +0300
committerAndrew Dolgov <[email protected]>2009-02-04 10:37:48 +0300
commit1b27261c8452a80f3cf54fd78c01e61c42757fcb (patch)
tree23df9a81fbe8732006213bf0116205d9960ac198 /offline.js
parent774b8df8739d2cab5656fa9907c6e6dd6f32158e (diff)
implement view_offline()
Diffstat (limited to 'offline.js')
-rw-r--r--offline.js43
1 files changed, 38 insertions, 5 deletions
diff --git a/offline.js b/offline.js
index 58c2377c2..a46702144 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 = "<div class=\"postReply\">";
+
+ tmp += "<div class=\"postHeader\" onmouseover=\"enable_resize(true)\" "+
+ "onmouseout=\"enable_resize(false)\">";
+
+ tmp += "<div class=\"postDate\">"+rs.fieldByName("updated")+"</div>";
+
+ if (rs.fieldByName("link") != "") {
+ tmp += "<div clear='both'><a target=\"_blank\" "+
+ "href=\"" + rs.fieldByName("link") + "\">" +
+ rs.fieldByName("title") + "</a></div>";
+ } else {
+ tmp += "<div clear='both'>" + rs.fieldByName("title") + "</div>";
+ }
+
+ tmp += "<div style='float : right'> "+
+ "<img src='images/tag.png' class='tagsPic' alt='Tags' title='Tags'>";
+ tmp += rs.fieldByName("tags");
+ tmp += "</div>";
+
+ tmp += "<div clear='both'>fixme-comments</div>";
- render_article("FIXME");
- update_local_feedlist_counters();
+ tmp += "</div>";
+
+ tmp += "<div class=\"postContent\">"
+ tmp += rs.fieldByName("content");
+ tmp += "</div>";
+
+ tmp += "</div>";
+
+ render_article(tmp);
+ update_local_feedlist_counters();
+ }
return false;