enableHotkeys();
-/* var searchbox = doc.getElementById("searchbox");
-
- var search_query = "";
- var search_mode = "";
-
- if (searchbox) {
- search_query = searchbox.value;
- }
-
- var searchmodebox = doc.getElementById("searchmodebox");
-
- var search_mode;
-
- if (searchmodebox) {
- search_mode = searchmodebox[searchmodebox.selectedIndex].text;
- }
-
- var viewbox = doc.getElementById("viewbox");
-
- var view_mode;
-
- if (viewbox) {
- view_mode = viewbox[viewbox.selectedIndex].text;
- } else {
- view_mode = "All Posts";
- }
-
- setCookie("ttrss_vf_vmode", view_mode, getCookie("ttrss_cltime"));
-
- var limitbox = doc.getElementById("limitbox");
-
- var limit;
-
- if (limitbox) {
- limit = limitbox[limitbox.selectedIndex].text;
- setCookie("ttrss_vf_limit", limit, getCookie("ttrss_cltime"));
- } else {
- limit = "All";
- }
-
- // document.getElementById("ACTFEEDID").innerHTML = feed; */
-
var toolbar_query = parent.Form.serialize("main_toolbar_form");
+ var toolbar_form = parent.document.forms["main_toolbar_form"];
if (parent.document.forms["main_toolbar_form"].query) {
- parent.document.forms["main_toolbar_form"].query.value = "";
+ toolbar_form.query.value = "";
}
+ setCookie("ttrss_vf_limit", toolbar_form.limit[toolbar_form.limit.selectedIndex].value);
+ setCookie("ttrss_vf_vmode", toolbar_form.view_mode[toolbar_form.view_mode.selectedIndex].value);
+
var query = "backend.php?op=viewfeed&feed=" + feed + "&" +
toolbar_query + "&subop=" + param_escape(subop);
}
setActiveFeedId(feed);
-
-/* 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 (subop == "MarkAllRead") {
setActiveFeedId(next_unread_feed);
}
}
-
-// if (search_query != "") {
-// query = query + "&search=" + param_escape(search_query);
-// searchbox.value = "";
-// }
if (cat_view_mode) {
query = query + "&cat=1";
parent.disableContainerChildren("headlinesToolbar", false);
parent.Form.enable("main_toolbar_form");
-
- // notify("");
} catch (e) {
exception_error("viewfeed", e);
}
updateFeedList(false, false);
document.onkeydown = hotkey_handler;
-
-/* var viewbox = document.getElementById("viewbox");
- var limitbox = document.getElementById("limitbox");
- dropboxSelect(viewbox, getCookie("ttrss_vf_vmode"));
- dropboxSelect(limitbox, getCookie("ttrss_vf_limit")); */
+ var tb = parent.document.forms["main_toolbar_form"];
+
+ dropboxSelect(tb.view_mode, getCookie("ttrss_vf_vmode"));
+ dropboxSelect(tb.limit, getCookie("ttrss_vf_limit"));
daemon_enabled = getCookie("ttrss_vf_daemon");