]> git.wh0rd.org Git - tt-rss.git/commitdiff
initial hidden feedlist work (refs #194)
authorAndrew Dolgov <fox@bah.spb.su>
Tue, 19 Feb 2008 16:00:02 +0000 (17:00 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Tue, 19 Feb 2008 16:00:02 +0000 (17:00 +0100)
feedlist.js
functions.php
tt-rss.js
tt-rss.php

index 878a538c149383935ab4b549036a214a9e3086da..e1a1e7c561023349dec7b81d0f37bee6430afe8e 100644 (file)
@@ -40,6 +40,11 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) {
                        cache_invalidate("F:" + feed);
                }
 
+               if (getInitParam("theme") == "" &&  getInitParam("hide_feedlist")) {
+                       Element.hide("feeds-holder");
+                       
+               }
+
                var force_nocache = false;
 
                var page_offset = 0;
@@ -338,9 +343,11 @@ function feedlist_init() {
 
                if (getInitParam("theme") == "") {
                        setTimeout("hide_footer()", 5000);
-               }
 
-//             init_hidden_feedlist();
+                       if (getInitParam("hide_feedlist")) {
+                               init_hidden_feedlist();
+                       }
+               }
 
        } catch (e) {
                exception_error("feedlist/init", e);
@@ -378,14 +385,26 @@ function hide_footer() {
 
 function init_hidden_feedlist() {
        try {
+               debug("init_hidden_feedlist");
+
                var fl = document.getElementById("feeds-holder");
                var fh = document.getElementById("headlines-frame");
-               var fh = document.getElementById("headlines-frame");
-       
-               new Effect.Fade(fl);
+               var fc = document.getElementById("content-frame");
+               var ft = document.getElementById("toolbar");
+               var ff = document.getElementById("footer");
+               var fbtn = document.getElementById("toggle_feeds_btn");
 
-               
+               if (fbtn) Element.show(fbtn);
+
+               fl.style.top = fh.offsetTop + "px";
+               fl.style.backgroundColor = "white"; //FIXME
 
+               Element.hide(fl);
+               
+               fh.style.left = "0px";
+               ft.style.left = "0px";
+               if (fc) fc.style.left = "0px";
+               if (ff) ff.style.left = "0px";
 
        } catch (e) {
                exception_error("init_hidden_feedlist", e);
index 25ecec1c2a6e582aa8406c997a27044087143046..d4f853a541862e4a6cf5c8fa5b723481ac13a8fa 100644 (file)
                print "<param key=\"hide_read_shows_special\" value=\"" . 
                        (int) get_pref($link, "HIDE_READ_SHOWS_SPECIAL") . "\"/>";
 
+               if (defined('_HIDDEN_FL_TEST')) {
+                       print "<param key=\"hide_feedlist\" value=\"1\"/>";
+               }
+
                print "</init-params>";
        }
 
index d501890fe6fd7548ed74dcae4e0de1ef9c711f31..2bdca6919377c2ab4dc22be2b114ca34938d844c 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -739,4 +739,19 @@ function clearFeedArticles(feed_id) {
        return false;
 }
 
+function toggle_feedlist() {
+       try {
+               debug("toggle_feedlist");
+
+               var fl = document.getElementById("feeds-holder");
 
+               if (!Element.visible(fl)) {
+                       Element.show(fl);
+                       fl.style.zIndex = 30;
+               } else {
+                       Element.hide(fl);
+               }
+       } catch (e) {
+               exception_error(e, "toggle_feedlist");
+       }
+}
index c3c8957e1e5614ee67ea3257127557a5a96ae127..0cb86c365e5efb4c1c3824393d67626f0f8d498e 100644 (file)
@@ -158,6 +158,9 @@ window.onload = init;
 
                <form id="main_toolbar_form" onsubmit='return false'>
 
+               <input type="submit" value="<?php echo __("Toggle Feedlist") ?>" id="toggle_feeds_btn"
+                       onclick="toggle_feedlist()" style="display : none">
+
                <?php if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
 
                <?php echo __('Search:') ?>