toolbar_form.query.value = "";
}
-/* storeInitParam("toolbar_limit",
+ storeInitParam("toolbar_limit",
toolbar_form.limit[toolbar_form.limit.selectedIndex].value);
storeInitParam("toolbar_view_mode",
- toolbar_form.view_mode[toolbar_form.view_mode.selectedIndex].value); */
+ toolbar_form.view_mode[toolbar_form.view_mode.selectedIndex].value);
var query = "backend.php?op=viewfeed&feed=" + feed + "&" +
toolbar_query + "&subop=" + param_escape(subop);
if (lifetime) {
d = new Date();
- d.setTime(lifetime * 1000);
+ d.setTime(d.getTime() + (lifetime * 1000));
}
int_setCookie(name, value, d, path, domain, secure);
}
function getInitParam(key) {
- return getMainContext().init_params[key];
+ var c = getCookie("TTIP:" + key);
+ if (c) {
+ return c;
+ } else {
+ return getMainContext().init_params[key];
+ }
}
+function storeInitParam(key, value) {
+ try {
+ init_params[key] = value;
+ debug("storeInitParam: " + key + " => " + value +
+ " (" + getInitParam("cookie_lifetime") + ")");
+ if (getInitParam("cookie_lifetime") > 0) {
+ setCookie("TTIP:" + key, value, getInitParam("cookie_lifetime"));
+ } else {
+ setCookie("TTIP:" + key, value);
+ }
+ } catch (e) {
+ exception_error("storeInitParam", e);
+ }
+}
+
+
+/*
function storeInitParam(key, value, is_client) {
try {
if (!is_client) {
} catch (e) {
exception_error("storeInitParam", e);
}
-}
+} */
/*
function storeInitParams(params, is_client) {
var tb = parent.document.forms["main_toolbar_form"];
-// dropboxSelect(tb.view_mode, getInitParam("toolbar_view_mode"));
-// dropboxSelect(tb.limit, getInitParam("toolbar_limit"));
+ dropboxSelect(tb.view_mode, getInitParam("toolbar_view_mode"));
+ dropboxSelect(tb.limit, getInitParam("toolbar_limit"));
daemon_enabled = getInitParam("daemon_enabled") == 1;
daemon_refresh_only = getInitParam("daemon_refresh_only") == 1;