]> git.wh0rd.org Git - tt-rss.git/commitdiff
main frame now calls feeds-frame for viewfeed()
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 16 Nov 2005 05:25:13 +0000 (06:25 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 16 Nov 2005 05:25:13 +0000 (06:25 +0100)
tt-rss.js

index 830bf07443e3b714dbeaa90e2761bf8fa11b9617..0201e2a73fca62d5cb95bd2a1a76f6f098161536 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -219,103 +219,10 @@ function viewCurrentFeed(skip, subop) {
 }
 
 function viewfeed(feed, skip, subop) {
-
-//     notify("Loading headlines...");
-
-       enableHotkeys();
-
-       var searchbox = document.getElementById("searchbox");
-
-       if (searchbox) {
-               search_query = searchbox.value;
-       } else {
-               search_query = "";
-       } 
-
-       var searchmodebox = document.getElementById("searchmodebox");
-
-       if (searchmodebox) {
-               search_mode = searchmodebox.value;
-       } else {
-               search_mode = "";
-       }
-
-       setCookie("ttrss_vf_smode", search_mode);
-
-       var viewbox = document.getElementById("viewbox");
-
-       var view_mode;
-
-       if (viewbox) {
-               view_mode = viewbox[viewbox.selectedIndex].text;
-       } else {
-               view_mode = "All Posts";
-       }
-
-       setCookie("ttrss_vf_vmode", view_mode);
-
-       var limitbox = document.getElementById("limitbox");
-
-       var limit;
-
-       if (limitbox) {
-               limit = limitbox[limitbox.selectedIndex].text;
-               setCookie("ttrss_vf_limit", limit);
-       } else {
-               limit = "All";
-       }
-
-       setActiveFeedId(feed);
-
-       var f_doc = frames["feeds-frame"].document;
-
-//     f_doc.getElementById("ACTFEEDID").innerHTML = feed;
-
-       if (subop == "MarkAllRead") {
-
-               var feedr = f_doc.getElementById("FEEDR-" + feed);
-               var feedctr = f_doc.getElementById("FEEDCTR-" + feed);
-               
-               feedctr.className = "invisible";
-
-               if (feedr.className.match("Unread")) {
-                       feedr.className = feedr.className.replace("Unread", "");
-               }
-       }
-
-       var query = "backend.php?op=viewfeed&feed=" + param_escape(feed) +
-               "&skip=" + param_escape(skip) + "&subop=" + param_escape(subop) +
-               "&view=" + param_escape(view_mode) + "&limit=" + limit + 
-               "&smode=" + param_escape(search_mode);
-
-       if (search_query != "") {
-               query = query + "&search=" + param_escape(search_query);
-       }
-       
-       var headlines_frame = parent.frames["headlines-frame"];
-
-       headlines_frame.location.href = query + "&addheader=true";
-
-       cleanSelected("feedsList");
-       var feedr = document.getElementById("FEEDR-" + feed);
-       if (feedr) {
-               feedr.className = feedr.className + "Selected";
-       }
-       
-       disableContainerChildren("headlinesToolbar", false, doc);
-
-       var btnMarkAsRead = document.getElementById("btnMarkFeedAsRead");
-
-       if (btnMarkAsRead && !isNumeric(feed)) {
-               btnMarkAsRead.disabled = true;
-               btnMarkAsRead.className = "disabledButton";
-       }
-
-//     notify("");
-
+       var f = window.frames["feeds-frame"];
+       f.viewfeed(feed, skip, subop);
 }
 
-
 function timeout() {
        scheduleFeedUpdate(true);
        setTimeout("timeout()", 1800*1000);