]> git.wh0rd.org Git - tt-rss.git/commitdiff
experimental display of labelColorIndicators in FeedTree
authorAndrew Dolgov <fox@fakecake.org>
Sun, 21 Nov 2010 13:11:14 +0000 (16:11 +0300)
committerAndrew Dolgov <fox@fakecake.org>
Sun, 21 Nov 2010 13:11:14 +0000 (16:11 +0300)
FeedTree.js
functions.php

index 93ccf002505b734a13f9c90e69162587b5d36026..f2e82d13d0be0b1e2b397a88e2e7fe40b594284b 100644 (file)
@@ -100,6 +100,20 @@ dojo.declare("fox.FeedTree", dijit.Tree, {
                var id = args.item.id[0];
                var bare_id = parseInt(id.substr(id.indexOf(':')+1));
 
+               if (bare_id < -10) {
+                       var span = dojo.doc.createElement('span');
+                       var fg_color = args.item.fg_color[0];
+                       var bg_color = args.item.bg_color[0];
+
+                       span.innerHTML = "&alpha;";
+                       span.className = 'labelColorIndicator';
+                       span.setStyle({
+                               color: fg_color,
+                               backgroundColor: bg_color});
+
+                       dojo.place(span, tnode.iconNode, 'replace');
+               }
+
                if (id.match("FEED:") && bare_id > 0) {
                        var menu = new dijit.Menu();
                        menu.row_id = bare_id;
index a4e431c0201c1349ab6c208df129b9163d30cef9..eb64f51f91ce0037b2b1f9ceb7005dc8b56c20c8 100644 (file)
        
                                $label_id = -$line['id'] - 11;
                                $count = getFeedUnread($link, $label_id);
-       
-                               array_push($cat['items'], feedlist_init_feed($link, $label_id, 
-                                       false, $count));
+
+                               $feed = feedlist_init_feed($link, $label_id, false, $count);
+
+                               $feed['fg_color'] = $line['fg_color'];
+                               $feed['bg_color'] = $line['bg_color'];
+
+                               array_push($cat['items'], $feed);
                        }
        
                        if ($enable_cats) {