main frame now calls feeds-frame for viewfeed()
This commit is contained in:
parent
2db4190c9e
commit
db8d6f6714
97
tt-rss.js
97
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 f = window.frames["feeds-frame"];
|
||||
f.viewfeed(feed, skip, subop);
|
||||
}
|
||||
|
||||
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("");
|
||||
|
||||
}
|
||||
|
||||
|
||||
function timeout() {
|
||||
scheduleFeedUpdate(true);
|
||||
setTimeout("timeout()", 1800*1000);
|
||||
|
|
Loading…
Reference in New Issue