From: Andrew Dolgov Date: Fri, 12 Nov 2010 12:14:47 +0000 (+0300) Subject: new category (un)collapse icons X-Git-Tag: 1.5.0~262 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=76d453330df1c5076f3194526f758e368a59c9e6;p=tt-rss.git new category (un)collapse icons --- diff --git a/feedlist.js b/feedlist.js index 3dfc98cb..b1608ec1 100644 --- a/feedlist.js +++ b/feedlist.js @@ -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) } ); diff --git a/functions.php b/functions.php index 7ab6fabb..12770499 100644 --- a/functions.php +++ b/functions.php @@ -4275,9 +4275,11 @@ 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"; @@ -4295,7 +4297,7 @@ print "
  • $tmp_category"; print ""; diff --git a/images/cat-collapse.png b/images/cat-collapse.png old mode 100644 new mode 100755 index dc6edaf3..ee4cebb7 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 index 00000000..926bc5fd Binary files /dev/null and b/images/cat-uncollapse.png differ diff --git a/tt-rss.css b/tt-rss.css index de097042..166b79fc 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -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 {