]> git.wh0rd.org Git - tt-rss.git/commitdiff
new category (un)collapse icons
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 12 Nov 2010 12:14:47 +0000 (15:14 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 12 Nov 2010 12:14:47 +0000 (15:14 +0300)
feedlist.js
functions.php
images/cat-collapse.png [changed mode: 0644->0755]
images/cat-uncollapse.png [new file with mode: 0755]
tt-rss.css

index 3dfc98cbf5a4b7cff3584ccd4d1f27bdf70c6b82..b1608ec18349f333e9b2300d537d12c3ccb85af0 100644 (file)
@@ -371,6 +371,13 @@ function toggleCollapseCat(cat) {
                Effect.toggle('FCATLIST-' + cat, 'blind', { duration: 0.5,
                        afterFinish: toggleCollapseCat_af });
 
+               var img = cat_elem.getElementsByTagName("IMG")[0];
+
+               if (img.src.match("-collapse"))
+                       img.src = img.src.replace("-collapse", "-uncollapse")
+               else
+                       img.src = img.src.replace("-uncollapse", "-collapse")
+
                new Ajax.Request("backend.php", 
                        { parameters: "backend.php?op=feeds&subop=collapse&cid=" + 
                                param_escape(cat) } );
index 7ab6fabb37800db756a4b86e5ca4fb6836aacbe9..127704990b6a649923ee4c261f3ab93ce62de844 100644 (file)
                        if ($hidden) {
                                $holder_style = "display:none;";
                                $ellipsis = "…";
+                               $collapse_pic = "cat-uncollapse.png";
                        } else {
                                $holder_style = "";
                                $ellipsis = "";
+                               $collapse_pic = "cat-collapse.png";
                        }
 
                        $catctr_class = ($cat_unread > 0) ? "catCtrHasUnread" : "catCtrNoUnread";
                        print "<li class=\"$cat_class\" id=\"FCAT-$cat_id\">
                                <img onclick=\"toggleCollapseCat($cat_id)\" class=\"catCollapse\"
                                        title=\"".__('Click to collapse category')."\"
-                                       src=\"images/cat-collapse.png\"><span class=\"$inner_title_class\" 
+                                       src=\"images/$collapse_pic?\"><span class=\"$inner_title_class\" 
                                        id=\"FCATN-$cat_id\" $browse_cat_link/>$tmp_category</span>";
 
                        print "<span id=\"FCAP-$cat_id\">";
old mode 100644 (file)
new mode 100755 (executable)
index dc6edaf..ee4cebb
Binary files a/images/cat-collapse.png and b/images/cat-collapse.png differ
diff --git a/images/cat-uncollapse.png b/images/cat-uncollapse.png
new file mode 100755 (executable)
index 0000000..926bc5f
Binary files /dev/null and b/images/cat-uncollapse.png differ
index de097042f5da38a234fb79963d9af79f95d677ad..166b79fc0a35c5e02065f067b35d0039b27cc133 100644 (file)
@@ -134,6 +134,10 @@ ul.feedList li.feedCat, ul.feedList li.virtCat {
 
 ul.feedList img.catCollapse {
        cursor : pointer;
+       vertical-align : middle;
+       width : 11px;
+       height : 11px;
+       padding-bottom : 3px;
 }
 
 ul.feedList span.catTitle {