]> git.wh0rd.org Git - tt-rss.git/commitdiff
add placeholder view_offline()
authorAndrew Dolgov <fox@bah.org.ru>
Tue, 3 Feb 2009 16:38:33 +0000 (19:38 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Tue, 3 Feb 2009 16:38:33 +0000 (19:38 +0300)
feedlist.js
viewfeed.js

index 05867d7b3f874f4ef74dd201e149ebe8d1a6665d..29de567bcecf3a680e1bcd60fcb2834756168746 100644 (file)
@@ -151,6 +151,9 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off
                        } 
                }
 
+               disableContainerChildren("headlinesToolbar", false);
+               Form.enable("main_toolbar_form");
+
                var f = document.getElementById("headlines-frame");
                try {
                        if (reply.offset == 0) { 
@@ -241,8 +244,8 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off
                                tmp += "<td onclick='view("+id+","+feed_id+")' "+
                                        "class='hlContent' valign='middle'>";
        
-                               tmp += "<a id=\"RTITLE-$id\" href=\"" + 
-                                       param_escape(rs.fieldByName("link")) + "\"" +
+                               tmp += "<a target=\"_blank\" id=\"RTITLE-$id\" href=\"" + 
+                                       rs.fieldByName("link") + "\"" +
                                        "onclick=\"return view("+id+","+feed_id+");\">"+
                                        rs.fieldByName("title");
 
index e8330350043e2c43a385ef63646e8359924dc265..de392103f64b3dfeb6f025c2609ed2d8a3e3d973 100644 (file)
@@ -381,11 +381,28 @@ function article_callback2(transport, id, feed_id) {
        }
 }
 
+function view_offline(id, feed_id) {
+       try {
+
+               enableHotkeys();
+               showArticleInHeadlines(id);
+
+               render_article("FIXME");
+
+               return false;
+
+       } catch (e) {
+               exception_error("view_offline", e);
+       }
+}
+
 function view(id, feed_id, skip_history) {
        
        try {
                debug("loading article: " + id + "/" + feed_id);
-       
+
+               if (offline_mode) return view_offline(id, feed_id);
+
                var cached_article = cache_find(id);
 
                debug("cache check result: " + (cached_article != false));