$reply['content'] .= $labels_str;
+ $reply['content'] .= "<span class='collapseBtn' style='display : none'>
+ <img src=\"images/collapse.png\" onclick=\"cdmCollapseArticle(event, $id)\"
+ title=\"".__("Collapse article")."\"/></span>";
+
if (!$expand_cdm)
$content_hidden = "style=\"display : none\"";
else
$reply['content'] .= "<span $excerpt_hidden
id=\"CEXC-$id\" class=\"cdmExcerpt\"> - $content_preview</span>";
-
$reply['content'] .= "</span>";
if (!get_pref($this->link, 'VFEED_GROUP_BY_FEED')) {
"article_scroll_up" => __("Scroll up"),
"select_article_cursor" => __("Select article under cursor"),
"email_article" => __("Email article"),
- "close_article" => __("Close article"),
+ "close_article" => __("Close/collapse article"),
"toggle_widescreen" => __("Toggle widescreen mode")),
__("Article selection") => array(
"select_all" => __("Select all articles"),
}
}
+function cdmCollapseArticle(event, id) {
+ try {
+ var row = $("RROW-" + id);
+ var elem = $("CICD-" + id);
+
+ if (elem && row) {
+ row.removeClassName("Selected");
+
+ var collapse = $$("div#RROW-" + id +
+ " span[class='collapseBtn']")[0];
+
+ Element.hide(elem);
+ Element.show("CEXC-" + id);
+ Element.hide(collapse);
+
+ markHeadline(id, false);
+
+ if (id == getActiveArticleId()) {
+ setActiveArticleId(0);
+ }
+
+ if (event) Event.stop(event);
+ }
+
+ } catch (e) {
+ exception_error("cdmCollapseArticle", e);
+ }
+}
+
function cdmExpandArticle(id) {
try {
var old_offset = $("RROW-" + id).offsetTop;
if (getActiveArticleId() && elem && !getInitParam("cdm_expanded")) {
+ var collapse = $$("div#RROW-" + getActiveArticleId() +
+ " span[class='collapseBtn']")[0];
+
Element.hide(elem);
Element.show("CEXC-" + getActiveArticleId());
+ Element.hide(collapse);
}
setActiveArticleId(id);
elem = $("CICD-" + id);
+ var collapse = $$("div#RROW-" + id +
+ " span[class='collapseBtn']")[0];
+
if (!Element.visible(elem)) {
Element.show(elem);
Element.hide("CEXC-" + id);
+ Element.show(collapse);
}
/* var new_offset = $("RROW-" + id).offsetTop;
if (!event.ctrlKey) {
if (!getInitParam("cdm_expanded")) {
+ if (event) Event.stop(event);
return cdmExpandArticle(id);
} else {
return getInitParam("combined_display_mode");
}
-function markHeadline(id) {
+function markHeadline(id, marked) {
+ if (marked == undefined) marked = true;
+
var row = $("RROW-" + id);
if (row) {
var check = dijit.byId("RCHK-" + id);
if (check) {
- check.attr("checked", true);
+ check.attr("checked", marked);
}
row.addClassName("Selected");