From: Andrew Dolgov Date: Tue, 1 Aug 2006 04:59:21 +0000 (+0100) Subject: fix name display in catchup prompt in category view mode X-Git-Tag: schema_freeze_for_1.2.2~48 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=234e467cad708a98044cdcd647466e48feb9835b;p=tt-rss.git fix name display in catchup prompt in category view mode --- diff --git a/backend.php b/backend.php index 50772237..73bcea6a 100644 --- a/backend.php +++ b/backend.php @@ -389,7 +389,7 @@ $cat_id = sprintf("%d", $cat_id); print "
  • - $tmp_category + $tmp_category ($cat_unread unread)$ellipsis diff --git a/functions.js b/functions.js index 64fac613..08dcfc66 100644 --- a/functions.js +++ b/functions.js @@ -1363,9 +1363,16 @@ function fatalError(code, message) { } } -function getFeedName(id) { +function getFeedName(id, is_cat) { var d = getFeedsContext().document; - var e = d.getElementById("FEEDN-" + id); + + var e; + + if (is_cat) { + e = d.getElementById("FCATN-" + id); + } else { + e = d.getElementById("FEEDN-" + id); + } if (e) { return e.innerHTML.stripTags(); } else { diff --git a/tt-rss.js b/tt-rss.js index 538e3203..164e7ea2 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -559,9 +559,15 @@ function parse_runtime_info(elem) { function catchupCurrentFeed() { - var fn = getFeedName(getActiveFeedId()); + var fn = getFeedName(getActiveFeedId(), active_feed_is_cat); - if (confirm("Mark all articles in " + fn + " as read?")) { + var str = "Mark all articles in " + fn + " as read?"; + +/* if (active_feed_is_cat) { + str = "Mark all articles in this category as read?"; + } */ + + if (confirm(str)) { return viewCurrentFeed(0, 'MarkAllRead') } }