diff --git a/modules/pref-labels.php b/modules/pref-labels.php
index 66753df9a..ffaea56fb 100644
--- a/modules/pref-labels.php
+++ b/modules/pref-labels.php
@@ -7,11 +7,20 @@
$kind = db_escape_string($_REQUEST["kind"]);
$ids = split(',', db_escape_string($_REQUEST["ids"]));
$color = db_escape_string($_REQUEST["color"]);
+ $fg = db_escape_string($_REQUEST["fg"]);
+ $bg = db_escape_string($_REQUEST["bg"]);
foreach ($ids as $id) {
- db_query($link, "UPDATE ttrss_labels2 SET
- ${kind}_color = '$color' WHERE id = '$id'
- AND owner_uid = " . $_SESSION["uid"]);
+
+ if ($kind == "fg" || $kind == "bg") {
+ db_query($link, "UPDATE ttrss_labels2 SET
+ ${kind}_color = '$color' WHERE id = '$id'
+ AND owner_uid = " . $_SESSION["uid"]);
+ } else {
+ db_query($link, "UPDATE ttrss_labels2 SET
+ fg_color = '$fg', bg_color = '$bg' WHERE id = '$id'
+ AND owner_uid = " . $_SESSION["uid"]);
+ }
}
return;
@@ -112,31 +121,49 @@
$label_search = $_SESSION["prefs_label_search"];
}
- print "
";
-
- $color_picker_pairs = array(
- array('#063064', '#fff7d5'),
- array('#ffffff', '#00ccff'),
- array('#ffffff', '#cc00ff'),
- array('#ffffff', '#00ffcc'),
- array('#ffffff', '#0000ff'),
- array('#ffffff', '#ff00ff'),
- array('#ffffff', '#ff0000'),
- array('#394f00', '#ccff00'));
-
- foreach ($color_picker_pairs as $c) {
- $fg_color = $c[0];
- $bg_color = $c[1];
-
- print "
z
";
+ function print_color_picker($id) {
- }
+ print "
";
+
+ $color_picker_pairs = array(
+ array('#ff0000', '#ffffff'),
+ array('#009000', '#ffffff'),
+ array('#0000ff', '#ffffff'),
+ array('#ff00ff', '#ffffff'),
+ array('#009090', '#ffffff'),
+ array('#ffffff', '#ff0000'),
+ array('#000000', '#00ff00'),
+ array('#ffffff', '#0000ff'),
+ array('#ffffff', '#ff00ff'),
+ array('#000000', '#00ffff'),
+ array('#000000', '#ffffff'),
+ array('#ffffff', '#000000'),
+ array('#ffffff', '#909000'),
+ array('#063064', '#fff7d5'),
+ array('#ffffff', '#4E4E90'),
+ );
+
+ foreach ($color_picker_pairs as $c) {
+ $fg_color = $c[0];
+ $bg_color = $c[1];
+
+ print "
α
";
+
+ }
+
+ print "
";
- print "
";
+ print "
".__('custom color:')."";
+ print "
".__("foreground")."
";
+ print "
".__("background")."
";
- print "
";
+ print "
";
+ }
print "