fix frontend not knowing about always expanded cdm

This commit is contained in:
Andrew Dolgov 2010-11-11 12:19:28 +03:00
parent 3505baeb14
commit 5ae8f858a9
3 changed files with 8 additions and 13 deletions

View File

@ -3180,8 +3180,8 @@
$data = array(); $data = array();
$data['num_feeds'] = (int) $num_feeds; $data['num_feeds'] = (int) $num_feeds;
$data['last_article_id'] = getLastArticleId($link); $data['last_article_id'] = getLastArticleId($link);
$data['cdm_expanded'] = get_pref($link, 'CDM_EXPANDED');
if (ENABLE_UPDATE_DAEMON) { if (ENABLE_UPDATE_DAEMON) {

View File

@ -556,10 +556,6 @@ function parse_runtime_info(elem) {
// console.log("RI: " + k + " => " + v); // console.log("RI: " + k + " => " + v);
if (k == "num_feeds" || k == "last_article_id") {
init_params[k] = v;
}
if (k == "new_version_available") { if (k == "new_version_available") {
var icon = $("newVersionIcon"); var icon = $("newVersionIcon");
if (icon) { if (icon) {
@ -569,25 +565,24 @@ function parse_runtime_info(elem) {
icon.style.display = "none"; icon.style.display = "none";
} }
} }
return;
} }
var error_flag; var error_flag;
if (k == "daemon_is_running" && v != 1) { if (k == "daemon_is_running" && v != 1) {
notify_error("<span onclick=\"javascript:explainError(1)\">Update daemon is not running.</span>", true); notify_error("<span onclick=\"javascript:explainError(1)\">Update daemon is not running.</span>", true);
error_flag = true; return;
} }
if (k == "daemon_stamp_ok" && v != 1) { if (k == "daemon_stamp_ok" && v != 1) {
notify_error("<span onclick=\"javascript:explainError(3)\">Update daemon is not updating feeds.</span>", true); notify_error("<span onclick=\"javascript:explainError(3)\">Update daemon is not updating feeds.</span>", true);
error_flag = true; return;
} }
if (!error_flag) { init_params[k] = v;
notify(''); notify('');
} }
}
} }
function catchupCurrentFeed() { function catchupCurrentFeed() {

View File

@ -164,7 +164,7 @@ function headlines_callback2(transport, feed_cur_page) {
} else { } else {
if (headlines) { if (headlines) {
if (headlines_count > 0) { if (headlines_count > 0) {
console.warn("adding some more headlines..."); console.log("adding some more headlines...");
var c = $("headlinesList"); var c = $("headlinesList");
@ -2088,7 +2088,7 @@ function cdmExpandArticle(id) {
var old_offset = $("RROW-" + id).offsetTop; var old_offset = $("RROW-" + id).offsetTop;
if (active_post_id && elem) { if (active_post_id && elem && !getInitParam("cdm_expanded")) {
Element.hide(elem); Element.hide(elem);
Element.show("CEXC-" + active_post_id); Element.show("CEXC-" + active_post_id);
} }