From: Andrew Dolgov Date: Wed, 16 Nov 2005 05:25:13 +0000 (+0100) Subject: main frame now calls feeds-frame for viewfeed() X-Git-Tag: schema_feature_freeze_for_1.1~307 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=db8d6f6714dade8d052772f60c4ab27abf186b44;p=tt-rss.git main frame now calls feeds-frame for viewfeed() --- diff --git a/tt-rss.js b/tt-rss.js index 830bf074..0201e2a7 100644 --- 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);