]> git.wh0rd.org Git - tt-rss.git/commitdiff
enable collapsing of labels
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 11 Aug 2007 17:44:20 +0000 (18:44 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 11 Aug 2007 17:44:20 +0000 (18:44 +0100)
feedlist.js
functions.php

index 344b28acf179cded13c8d2c6e5453b66fc44013d..af792ccff8573ea52acf7472585694244dcf59de 100644 (file)
@@ -238,6 +238,14 @@ function toggleCollapseCat(cat) {
                        }
                } 
 
+               if (cat == -2) {
+                       if (Element.visible("FCATLIST-" + cat)) {
+                               setCookie("ttrss_vf_lclps", "1");
+                       } else {
+                               setCookie("ttrss_vf_lclps", "0");
+                       }
+               } 
+
                Effect.toggle('FCATLIST-' + cat, 'blind', { duration: 0.5,
                        afterFinish: toggleCollapseCat_af });
 
index 37ea3d5bf808375f08fe4925adce419cfdbbaf79..115bb3475ac95aae5809ece5fca917310719a908 100644 (file)
                
                                if (db_num_rows($result) > 0) {
                                        if (get_pref($link, 'ENABLE_FEED_CATS')) {
-                                               print "<li class=\"feedCat\">".__('Labels')."</li>";
-                                               print "<li id=\"feedCatHolder\" class=\"feedCatHolder\"><ul class=\"feedCatList\">";
+
+                                               if ($_COOKIE["ttrss_vf_lclps"] == 1) {
+                                                       $holder_style = "display:none;";
+                                                       $ellipsis = "...";
+                                               } else {
+                                                       $holder_style = "";
+                                                       $ellipsis = "";
+                                               }
+
+                                               print "<li class=\"feedCat\">".
+                                                       "<a id=\"FCATN--2\" href=\"javascript:toggleCollapseCat(-2)\">".
+                                                       __('Labels')."</a> <span id='FCAP--2'>$ellipsis</span></li>";
+
+                                               print "<li id=\"feedCatHolder\" class=\"feedCatHolder\"><ul class=\"feedCatList\" id='FCATLIST--2' style='$holder_style'>";
                                        } else {
                                                print "<li><hr></li>";
                                        }