From 76d453330df1c5076f3194526f758e368a59c9e6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 12 Nov 2010 15:14:47 +0300 Subject: [PATCH] new category (un)collapse icons --- feedlist.js | 7 +++++++ functions.php | 4 +++- images/cat-collapse.png | Bin 161 -> 1232 bytes images/cat-uncollapse.png | Bin 0 -> 1242 bytes tt-rss.css | 4 ++++ 5 files changed, 14 insertions(+), 1 deletion(-) mode change 100644 => 100755 images/cat-collapse.png create mode 100755 images/cat-uncollapse.png 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 dc6edaf3b450fae550afcd6e873b4a2c54d00bdf..ee4cebb7599b37aabb99e3ad9cd0fe8e60e20a6a GIT binary patch literal 1232 zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s3?%0jwTl2L#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvNA9*GX(gAxB|r|Oqc*9N5NBd6K28CIzV*-rY&QO!7aVeqBH8#`M-3C`2i K&t;ucLK6VfNI6>o literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP%zlj z#WBR9_w9s@f(HyZj=VW5(R#6N%Ke@z#}0_UEDAh1H|0Z=y){3>5tSXkAI3ClPI_t< z;HnkLq;SP^{myGjmisc&ehKgPn0DJibY%+X$pH1*2KH1w73ZM5J*hzB89ZJ6T-G@y GGywpP$2GA4 diff --git a/images/cat-uncollapse.png b/images/cat-uncollapse.png new file mode 100755 index 0000000000000000000000000000000000000000..926bc5fdbad9ab1dc11ca4a884ff60ddea6b2d74 GIT binary patch literal 1242 zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s3?%0jwTl2L#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvNA9*GX(gAxB|r|Oqc*9N5NmQ9W|K4uZjVucf;TB;@lChYZiru>GLVfrHf UTiII_Z#)78&qol`;+02%%~Qvd(} literal 0 HcmV?d00001 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 { -- 2.39.5