enable collapsing of virtual category

This commit is contained in:
Andrew Dolgov 2007-08-12 14:44:41 +01:00
parent 051c4d56ca
commit 3b08617610
2 changed files with 26 additions and 2 deletions

View 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 });

View file

@ -3249,8 +3249,24 @@
/* 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);