]> git.wh0rd.org Git - tt-rss.git/commitdiff
store layout resize param in a cookie
authorAndrew Dolgov <fox@bah.spb.su>
Tue, 20 May 2008 01:03:35 +0000 (02:03 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Tue, 20 May 2008 01:03:35 +0000 (02:03 +0100)
feedlist.js
tt-rss.js

index 3618d918299d39a2d344805a0575400d5656dc95..379fff300ea310d37d8353e3bcef8af95d6409dc 100644 (file)
@@ -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);
        }
index 68a4da7950d4d871340f1aa369bede6fa233e779..1b037004db971a11306c7eceb79bd0fbecc143c1 100644 (file)
--- 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);
        }