diff options
author | Andrew Dolgov <[email protected]> | 2009-01-26 11:07:53 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-01-26 11:07:53 +0100 |
commit | 2eb9c95c970644f8408da9d22b60a66caadd36fb (patch) | |
tree | 28898aa275858840119816938380f1ef4562a5f6 /modules | |
parent | c218ceb82c23fc37179c792a6c67af5114f0d079 (diff) |
support colored labels
Diffstat (limited to 'modules')
-rw-r--r-- | modules/backend-rpc.php | 10 | ||||
-rw-r--r-- | modules/pref-labels.php | 14 |
2 files changed, 13 insertions, 11 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 855d54aa7..04e2858ca 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -444,10 +444,7 @@ print "<entry id=\"$id\"><![CDATA["; $labels = get_article_labels($link, $id, $_SESSION["uid"]); - - foreach ($labels as $l) { - print "<span class='hlLabelRef'>".$l[1]."</span>"; - } + print format_article_labels($labels, $id); print "]]></entry>"; @@ -483,10 +480,7 @@ print "<entry id=\"$id\"><![CDATA["; $labels = get_article_labels($link, $id, $_SESSION["uid"]); - - foreach ($labels as $l) { - print "<span class='hlLabelRef'>".$l[1]."</span>"; - } + print format_article_labels($labels, $id); print "]]></entry>"; diff --git a/modules/pref-labels.php b/modules/pref-labels.php index b09a16cf5..059079a71 100644 --- a/modules/pref-labels.php +++ b/modules/pref-labels.php @@ -110,7 +110,7 @@ } $result = db_query($link, "SELECT - id,caption + * FROM ttrss_labels2 WHERE @@ -149,12 +149,20 @@ print "<tr class=\"$class\" $this_row_id>"; $line["caption"] = htmlspecialchars($line["caption"]); - + + $fg_color = $line["fg_color"]; + $bg_color = $line["bg_color"]; + + if (!$fg_color) $fg_color = "black"; + if (!$bg_color) $bg_color = "transparent"; + print "<td width='5%' align='center'><input onclick='toggleSelectPrefRow(this, \"label\");' type=\"checkbox\" id=\"LICHK-".$line["id"]."\"></td>"; - print "<td><span id=\"LILT-".$line["id"]."\">" . $line["caption"] . + print "<td><span class='prefsLabelEntry' + style='color : $fg_color; background-color : $bg_color' + id=\"LILT-".$line["id"]."\">" . $line["caption"] . "</span></td>"; print "</tr>"; |