]> git.wh0rd.org Git - tt-rss.git/commitdiff
enable collapsing of virtual category
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 12 Aug 2007 13:44:41 +0000 (14:44 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 12 Aug 2007 13:44:41 +0000 (14:44 +0100)
feedlist.js
functions.php

index af792ccff8573ea52acf7472585694244dcf59de..04fab589f7ba36dd83c9a64b84c0eca7d333a915 100644 (file)
@@ -246,6 +246,14 @@ function toggleCollapseCat(cat) {
                        }
                } 
 
+               if (cat == -1) {
+                       if (Element.visible("FCATLIST-" + cat)) {
+                               setCookie("ttrss_vf_vclps", "1");
+                       } else {
+                               setCookie("ttrss_vf_vclps", "0");
+                       }
+               } 
+
                Effect.toggle('FCATLIST-' + cat, 'blind', { duration: 0.5,
                        afterFinish: toggleCollapseCat_af });
 
index 115bb3475ac95aae5809ece5fca917310719a908..04594f9da9f240dfbacb478c3480895e7c66072e 100644 (file)
                /* virtual feeds */
 
                if (get_pref($link, 'ENABLE_FEED_CATS')) {
-                       print "<li class=\"feedCat\">".__('Special')."</li>";
-                       print "<li id=\"feedCatHolder\" class=\"feedCatHolder\"><ul class=\"feedCatList\">";
+
+                       if ($_COOKIE["ttrss_vf_vclps"] == 1) {
+                               $holder_style = "display:none;";
+                               $ellipsis = "...";
+                       } else {
+                               $holder_style = "";
+                               $ellipsis = "";
+                       }
+
+#                      print "<li class=\"feedCat\">".__('Special')."</li>";
+#                      print "<li id=\"feedCatHolder\" class=\"feedCatHolder\"><ul class=\"feedCatList\">";            
+                       print "<li class=\"feedCat\">".
+                               "<a id=\"FCATN--1\" href=\"javascript:toggleCollapseCat(-1)\">".
+                               __('Special')."</a> <span id='FCAP--1'>$ellipsis</span></li>";
+
+                       print "<li id=\"feedCatHolder\" class=\"feedCatHolder\">
+                               <ul class=\"feedCatList\" id='FCATLIST--1' style='$holder_style'>";
+
                }
 
                $num_starred = getFeedUnread($link, -1);