From: Andrew Dolgov Date: Tue, 20 May 2008 01:03:35 +0000 (+0100) Subject: store layout resize param in a cookie X-Git-Tag: 1.2.23-final~40 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=43dbb07f112d6e4e5d55697c8f8db456df3e1d27;p=tt-rss.git store layout resize param in a cookie --- 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); }