+ postCreate: function() {
+ this.connect(this.model, "onChange", "updateCounter");
+ this.connect(this, "_expandNode", function() {
+ this.hideRead(getInitParam("hide_read_feeds"), getInitParam("hide_read_shows_special"));
+ });
+
+ this.inherited(arguments);
+ },
+ updateCounter: function (item) {
+ var tree = this;
+
+ //console.log("updateCounter: " + item.id[0] + " " + item.unread + " " + tree);
+
+ var node = tree._itemNodesMap[item.id];
+
+ if (node) {
+ node = node[0];
+
+ if (node.counterNode) {
+ 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 }}) :
+ Element.hide(ctr);
+
+ item.unread == 0 && item.auxcounter > 0 ? ctr.addClassName("aux") : ctr.removeClassName("aux");
+
+ }
+ }
+
+ },
+ getTooltip: function (item) {
+ if (item.updated)
+ return item.updated;
+ else
+ return "";
+ },