// 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);
- parent.storeInitParam("toolbar_limit",
+ storeInitParam("toolbar_limit",
toolbar_form.limit[toolbar_form.limit.selectedIndex].value);
- parent.storeInitParam("toolbar_view_mode",
+ storeInitParam("toolbar_view_mode",
toolbar_form.view_mode[toolbar_form.view_mode.selectedIndex].value);
var query = "backend.php?op=viewfeed&feed=" + feed + "&" +
}
function getActiveFeedId() {
- return getCookie("ttrss_vf_actfeed");
+// return getCookie("ttrss_vf_actfeed");
+ try {
+ debug("gAFID: " + getMainContext().active_feed_id);
+ return getMainContext().active_feed_id;
+ } catch (e) {
+ exception_error("getActiveFeedId", e);
+ }
}
function setActiveFeedId(id) {
- return setCookie("ttrss_vf_actfeed", id);
+// return setCookie("ttrss_vf_actfeed", id);
+ try {
+ getMainContext().active_feed_id = id;
+ } catch (e) {
+ exception_error("setActiveFeedId", e);
+ }
}
var xmlhttp_rpc = Ajax.getTransport();
function parse_counters(reply, scheduled_call) {
try {
- var f_document = getMainContext().frames["feeds-frame"].document;
+ var f_document = getFeedsContext().document;
var title_obj = getMainContext();
debug("F_DOC: " + f_document + ", T_OBJ: " + title_obj);
return;
}
- if (!parent.frames["feeds-frame"]) {
- notify("[all_counters_callback] no parent feeds-frame");
- return;
- }
-
var reply = xmlhttp_rpc.responseXML.firstChild;
-// var f_document = parent.frames["feeds-frame"].document;
parse_counters(reply);
closeInfoBox();
- var feeds_doc = window.frames["feeds-frame"].document;
+ var feeds_doc = getFeedsContext().document;
feeds_doc.location.href = "backend.php?op=error&msg=Loading,%20please wait...";
}
}
+function getFeedsContext() {
+ try {
+ return getMainContext().frames["feeds-frame"];
+ } catch (e) {
+ exception_error("getFeedsContext", e);
+ }
+}
+
function debug(msg) {
var ctx = getMainContext();
}
}
+function getInitParam(key) {
+ return getMainContext().init_params[key];
+}
+// TODO: batch mode
+function storeInitParam(key, value) {
+ try {
+ getMainContext().init_params[key] = value;
+ new Ajax.Request("backend.php?op=rpc&subop=storeParam&key=" +
+ param_escape(key) + "&value=" + param_escape(value));
+ } catch (e) {
+ exception_error("storeInitParam", e);
+ }
+}
var firsttime_update = true;
var last_refetch = 0;
var cookie_lifetime = 0;
+var active_feed_id = 0;
var xmlhttp = Ajax.getTransport();
cookie_lifetime = getCookie("ttrss_cltime");
delCookie("ttrss_vf_test");
-
- setCookie("ttrss_vf_actfeed", "");
updateFeedList(false, false);
document.onkeydown = hotkey_handler;
}
}
-function getInitParam(key) {
- return init_params[key];
-}
-function storeInitParam(key, value) {
- try {
- init_params[key] = value;
- new Ajax.Request("backend.php?op=rpc&subop=storeParam&key=" +
- param_escape(key) + "&value=" + param_escape(value));
- } catch (e) {
- exception_error("storeInitParam", e);
- }
-}