]> git.wh0rd.org - tt-rss.git/commitdiff
fix name display in catchup prompt in category view mode
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 1 Aug 2006 04:59:21 +0000 (05:59 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 1 Aug 2006 04:59:21 +0000 (05:59 +0100)
backend.php
functions.js
tt-rss.js

index 50772237988026d9a8b1dae24cb3fc5f01cf6485..73bcea6a92ec99415d3d1d385425e420c977afe6 100644 (file)
                                        $cat_id = sprintf("%d", $cat_id);
                                        
                                        print "<li class=\"feedCat\" id=\"FCAT-$cat_id\">
-                                               <a href=\"javascript:toggleCollapseCat($cat_id)\">$tmp_category</a>
+                                               <a id=\"FCATN-$cat_id\" href=\"javascript:toggleCollapseCat($cat_id)\">$tmp_category</a>
                                                        <a href=\"javascript:viewCategory($cat_id)\" id=\"FCAP-$cat_id\">
                                                        <span id=\"FCATCTR-$cat_id\" 
                                                        class=\"$catctr_class\">($cat_unread unread)$ellipsis</span>
index 64fac613544bf23ab2ee3a200b64be28e26e80fa..08dcfc66b0ac1c5f21d25f9f22f1af28ea0f3ef1 100644 (file)
@@ -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 {
index 538e3203cb31ae75a9ae816d05d850b593a902f3..164e7ea2885398df76fbec33132f8be3d07d16c2 100644 (file)
--- 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')
        }
 }