From 1d5e9fb908790f43eef5d383604c6285bb6614b9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 11 Aug 2007 13:02:50 +0100 Subject: [PATCH] collapsing cat style fixes --- feedlist.js | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/feedlist.js b/feedlist.js index eca86787..344b28ac 100644 --- a/feedlist.js +++ b/feedlist.js @@ -182,6 +182,28 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) { } } +function toggleCollapseCat_af(effect) { + //var caption = elem.id.replace("FCATLIST-", ""); + + try { + + var elem = effect.element; + var cat = elem.id.replace("FCATLIST-", ""); + var cap = document.getElementById("FCAP-" + cat); + + if (Element.visible(elem)) { + cap.innerHTML = cap.innerHTML.replace("...", ""); + } else { + if (cap.innerHTML.lastIndexOf("...") != cap.innerHTML.length-3) { + cap.innerHTML = cap.innerHTML + "..."; + } + } + + } catch (e) { + exception_error("toggleCollapseCat_af", e); + } +} + function toggleCollapseCat(cat) { try { if (!xmlhttp_ready(xmlhttp)) { @@ -216,7 +238,8 @@ function toggleCollapseCat(cat) { } } - Effect.toggle('FCATLIST-' + cat, 'blind', { duration: 0.5 }); + Effect.toggle('FCATLIST-' + cat, 'blind', { duration: 0.5, + afterFinish: toggleCollapseCat_af }); new Ajax.Request("backend.php?op=feeds&subop=collapse&cid=" + param_escape(cat)); -- 2.39.5