From 43dbb07f112d6e4e5d55697c8f8db456df3e1d27 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 20 May 2008 02:03:35 +0100 Subject: [PATCH] store layout resize param in a cookie --- feedlist.js | 4 ++-- tt-rss.js | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/feedlist.js b/feedlist.js index 3618d918..379fff30 100644 --- a/feedlist.js +++ b/feedlist.js @@ -481,7 +481,7 @@ function mouse_move_handler(e) { } - if (mouse_is_down && enable_resize) { + if (mouse_is_down) { if (mouse_y == 0) mouse_y = client_y; if (mouse_x == 0) mouse_x = client_x; @@ -501,7 +501,7 @@ function resize_enabled(b) { function mouse_down_handler(e) { try { - mouse_is_down = true; + if (enable_resize) mouse_is_down = true; } catch (e) { exception_error("mouse_move_handler", e); } diff --git a/tt-rss.js b/tt-rss.js index 68a4da79..1b037004 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -8,7 +8,6 @@ var daemon_enabled = false; var daemon_refresh_only = false; //var _qfd_deleted_feed = 0; var firsttime_update = true; -var cookie_lifetime = 0; var active_feed_id = 0; var active_feed_is_cat = false; var number_of_feeds = 0; @@ -361,6 +360,13 @@ function resize_headlines(delta_x, delta_y) { ver_reflow_delta = delta_y; + if (getInitParam("cookie_lifetime") != 0) { + setCookie("ttrss_reflow_ver", ver_reflow_delta, + getInitParam("cookie_lifetime")); + } else { + setCookie("ttrss_reflow_ver", ver_reflow_delta); + } + var h_frame = document.getElementById("headlines-frame"); var c_frame = document.getElementById("content-frame"); var f_frame = document.getElementById("footer"); @@ -415,8 +421,6 @@ function init_second_stage() { try { - cookie_lifetime = getCookie("ttrss_cltime"); - delCookie("ttrss_vf_test"); // document.onresize = resize_headlines; @@ -436,6 +440,10 @@ function init_second_stage() { loading_set_progress(60); + ver_reflow_delta = getCookie("ttrss_reflow_ver"); + + if (!ver_reflow_delta) ver_reflow_delta = 0; + } catch (e) { exception_error("init_second_stage", e); } -- 2.39.5