summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-25 14:04:49 +0400
committerAndrew Dolgov <[email protected]>2013-04-25 14:04:49 +0400
commit204f9b186ff903bb5638320ba73614a6a89e2d6d (patch)
treebdf88816c21e8e6fa39cdfe028bf6a5db64964d7 /js
parent2779e22bf5eb8eab0af91138e0d613f604a60a1a (diff)
remove cdmUnexpandArticle
Diffstat (limited to 'js')
-rw-r--r--js/tt-rss.js2
-rw-r--r--js/viewfeed.js36
2 files changed, 11 insertions, 27 deletions
diff --git a/js/tt-rss.js b/js/tt-rss.js
index 3f8545149..88a360f99 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -309,7 +309,7 @@ function init() {
var id = getActiveArticleId();
var elem = $("CICD-"+id);
if(elem.visible()) {
- cdmUnexpandArticle(null, id);
+ cdmCollapseArticle(null, id, false);
}
else {
cdmExpandArticle(id);
diff --git a/js/viewfeed.js b/js/viewfeed.js
index da869d92a..ada225cbf 100644
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -1395,8 +1395,10 @@ function catchupRelativeToArticle(below, id) {
}
}
-function cdmCollapseArticle(event, id) {
+function cdmCollapseArticle(event, id, unmark) {
try {
+ if (unmark == undefined) unmark = true;
+
var row = $("RROW-" + id);
var elem = $("CICD-" + id);
@@ -1407,12 +1409,15 @@ function cdmCollapseArticle(event, 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);
@@ -1425,27 +1430,6 @@ function cdmCollapseArticle(event, id) {
}
}
-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);