tweak cdmExpandArticle behavior with scrolling (refs #604)

This commit is contained in:
Andrew Dolgov 2013-03-21 09:21:14 +04:00
parent 5b0aec17e9
commit f06f201f1e
1 changed files with 3 additions and 8 deletions

View File

@ -1348,7 +1348,6 @@ function cdmCollapseArticle(event, id) {
function cdmExpandArticle(id) { function cdmExpandArticle(id) {
try { try {
console.log("cdmExpandArticle " + id); console.log("cdmExpandArticle " + id);
hideAuxDlg(); hideAuxDlg();
@ -1373,10 +1372,6 @@ function cdmExpandArticle(id) {
setActiveArticleId(id); setActiveArticleId(id);
if (!getInitParam("cdm_expanded")) {
cdmScrollToArticleId(id, true);
}
elem = $("CICD-" + id); elem = $("CICD-" + id);
var collapse = $$("div#RROW-" + id + var collapse = $$("div#RROW-" + id +
@ -1395,12 +1390,12 @@ function cdmExpandArticle(id) {
Element.show(collapse); Element.show(collapse);
} }
/* var new_offset = $("RROW-" + id).offsetTop; var new_offset = $("RROW-" + id).offsetTop;
$("headlines-frame").scrollTop += (new_offset-old_offset); $("headlines-frame").scrollTop += (new_offset-old_offset);
if ($("RROW-" + id).offsetTop != old_offset) // if ($("RROW-" + id).offsetTop != old_offset)
$("headlines-frame").scrollTop = new_offset; */ // $("headlines-frame").scrollTop = new_offset;
toggleUnread(id, 0, true); toggleUnread(id, 0, true);
toggleSelected(id); toggleSelected(id);