From 9fe80bcdadfbc318c2f6e0ee1b8957b3275d0817 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 21 Nov 2010 16:11:14 +0300 Subject: [PATCH] experimental display of labelColorIndicators in FeedTree --- FeedTree.js | 14 ++++++++++++++ functions.php | 10 +++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/FeedTree.js b/FeedTree.js index 93ccf002..f2e82d13 100644 --- a/FeedTree.js +++ b/FeedTree.js @@ -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 = "α"; + 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; diff --git a/functions.php b/functions.php index a4e431c0..eb64f51f 100644 --- a/functions.php +++ b/functions.php @@ -4232,9 +4232,13 @@ $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) { -- 2.39.5