]> git.wh0rd.org - tt-rss.git/blobdiff - js/FeedTree.js
add special class for feeds with disabled updates
[tt-rss.git] / js / FeedTree.js
old mode 100644 (file)
new mode 100755 (executable)
index a78537f..aff481e
@@ -238,8 +238,10 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
                                        ctr = node.counterNode;
                                        ctr.innerHTML = item.unread > 0 ? item.unread : item.auxcounter;
                                        item.unread > 0 || item.auxcounter > 0 ?
-                                               Effect.Appear(ctr, {duration : 0.3,
-                                                       queue: { position: 'end', scope: 'CAPPEAR-' + item.id, limit: 1 }}) :
+                                               item.unread > 0 ?
+                                                       Effect.Appear(ctr, {duration : 0.3,
+                                                               queue: { position: 'end', scope: 'CAPPEAR-' + item.id, limit: 1 }}) :
+                                                       Element.show(ctr) :
                                                Element.hide(ctr);
 
                                        item.unread == 0 && item.auxcounter > 0 ? ctr.addClassName("aux") : ctr.removeClassName("aux");
@@ -265,6 +267,7 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
                                "dijitTreeRow Error";
 
                        if (item.unread > 0) rc += " Unread";
+                       if (item.updates_disabled > 0) rc += " UpdatesDisabled";
 
                        return rc;
                },
@@ -300,7 +303,7 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
                                        }
                                }
                        } catch (e) {
-                               exception_error("expandParentNodes", e);
+                               exception_error(e);
                        }
                },
                findNodeParentsAndExpandThem: function(feed, is_cat, root, parents) {
@@ -339,7 +342,7 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
                                        }
                                }
                        } catch (e) {
-                               exception_error("findNodeParentsAndExpandThem", e);
+                               exception_error(e);
                        }
                },
                selectFeed: function(feed, is_cat) {
@@ -354,6 +357,12 @@ require(["dojo/_base/declare", "dojo/dom-construct", "dijit/Tree", "dijit/Menu"]
                                treeNode = treeNode[0];
                                if (!is_cat) this._expandNode(treeNode);
                                this.set("selectedNodes", [treeNode]);
+                               this.focusNode(treeNode);
+
+                               // focus headlines to route key events there
+                               setTimeout(function() {
+                                       $("headlines-frame").focus();
+                               }, 0);
                        }
                },
                setFeedIcon: function(feed, is_cat, src) {