]> git.wh0rd.org - tt-rss.git/blobdiff - functions.js
update_daemon2: fix locking
[tt-rss.git] / functions.js
index 8eb7cc60fcc4c51bba05d06f6265d111d6d4a7d1..ddfce24771765601d1a2f04918cf0b40b4877464 100644 (file)
@@ -778,6 +778,15 @@ function all_counters_callback2(transport) {
        }
 }
 
+function get_feed_unread(id) {
+       try {
+               return parseInt(document.getElementById("FEEDU-" + id).innerHTML);      
+       } catch (e) {
+               exception_error("get_feed_unread", e, true);
+               return -1;
+       }
+}
+
 function get_feed_entry_unread(doc, elem) {
 
        var id = elem.id.replace("FEEDR-", "");
@@ -919,7 +928,7 @@ function hideOrShowFeedsCategory(doc, node, hide, cat_node) {
                return;
        }
 
-       debug("cat: " + node.id);
+//     debug("cat: " + node.id);
 
        if (node.hasChildNodes() && node.firstChild.nextSibling != false) {  
                for (i = 0; i < node.childNodes.length; i++) {
@@ -929,7 +938,8 @@ function hideOrShowFeedsCategory(doc, node, hide, cat_node) {
 
                                var has_unread = (node.childNodes[i].className != "feed" &&
                                        node.childNodes[i].className != "label" && 
-                                       node.childNodes[i].className != "virt" && 
+                                       !(!getInitParam("hide_read_shows_special") && 
+                                               node.childNodes[i].className == "virt") && 
                                        node.childNodes[i].className != "error" && 
                                        node.childNodes[i].className != "tag");
        
@@ -957,7 +967,7 @@ function hideOrShowFeedsCategory(doc, node, hide, cat_node) {
                }
        }       
 
-       debug("end cat: " + node.id + " unread " + cat_unread);
+//     debug("end cat: " + node.id + " unread " + cat_unread);
 
        if (cat_unread == 0) {
                if (cat_node.style == undefined) {
@@ -1722,4 +1732,12 @@ function getSelectedArticleIds2() {
        return ids;
 }
 
+function displayHelpInfobox(topic_id) {
+
+       var url = "backend.php?op=help&tid=" + param_escape(topic_id);
+
+       var w = window.open(url, "ttrss_help", 
+               "status=0,toolbar=0,location=0,width=450,height=500,scrollbars=1,menubar=0");
 
+       return false;
+}