var id = getActiveArticleId();
var elem = $("CICD-"+id);
if(elem.visible()) {
- cdmUnexpandArticle(null, id);
+ cdmCollapseArticle(null, id, false);
}
else {
cdmExpandArticle(id);
}
}
-function cdmCollapseArticle(event, id) {
+function cdmCollapseArticle(event, id, unmark) {
try {
+ if (unmark == undefined) unmark = true;
+
var row = $("RROW-" + id);
var elem = $("CICD-" + id);
Element.hide(elem);
Element.show("CEXC-" + id);
Element.hide(collapse);
- row.removeClassName("active");
- markHeadline(id, false);
+ if (unmark) {
+ row.removeClassName("active");
+
+ markHeadline(id, false);
- if (id == getActiveArticleId()) {
- setActiveArticleId(0);
+ if (id == getActiveArticleId()) {
+ setActiveArticleId(0);
+ }
}
if (event) Event.stop(event);
}
}
-function cdmUnexpandArticle(event, id) {
- try {
- var row = $("RROW-" + id);
- var elem = $("CICD-" + id);
-
- if (elem && row) {
- var collapse = $$("div#RROW-" + id +
- " span[class='collapseBtn']")[0];
-
- Element.hide(elem);
- Element.show("CEXC-" + id);
- Element.hide(collapse);
-
- if (event) Event.stop(event);
- }
-
- } catch (e) {
- exception_error("cdmUnexpandArticle", e);
- }
-}
-
function cdmExpandArticle(id, noexpand) {
try {
console.log("cdmExpandArticle " + id);