if (force || e.offsetTop+e.offsetHeight > (ctr.scrollTop+ctr.offsetHeight) ||
e.offsetTop < ctr.scrollTop) {
- ctr.scrollTop = e.offsetTop;
+
+ // expanded cdm has a 4px margin now
+ ctr.scrollTop = parseInt(e.offsetTop) - 4;
}
} catch (e) {
if (!$("RROW-" + id)) return false;
+ var oldrow = $("RROW-" + getActiveArticleId());
+
var elem = $("CICD-" + getActiveArticleId());
if (id == getActiveArticleId() && Element.visible(elem))
Element.hide(elem);
Element.show("CEXC-" + getActiveArticleId());
Element.hide(collapse);
- $("RROW-" + getActiveArticleId()).removeClassName("active");
}
+ if (oldrow) oldrow.removeClassName("active");
+
setActiveArticleId(id);
elem = $("CICD-" + id);
Element.show(elem);
Element.hide("CEXC-" + id);
Element.show(collapse);
- $("RROW-" + id).addClassName("active");
}
var new_offset = $("RROW-" + id).offsetTop;
toggleUnread(id, 0, true);
toggleSelected(id);
+ $("RROW-" + id).addClassName("active");
} catch (e) {
exception_error("cdmExpandArticle", e);