enable collapsing of labels

This commit is contained in:
Andrew Dolgov 2007-08-11 18:44:20 +01:00
parent 34a01a2078
commit bd64489f65
2 changed files with 22 additions and 2 deletions

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

View File

@ -3283,8 +3283,20 @@
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>";
}