summaryrefslogtreecommitdiff
path: root/modules/pref-labels.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-26 12:30:13 +0100
committerAndrew Dolgov <[email protected]>2009-01-26 12:30:13 +0100
commitb8776a07f1c125955a9e8ad1ca13097411568fbd (patch)
tree97342cd8fe1ee5a4ea8da9ec8d93cf8a1e6b689d /modules/pref-labels.php
parentd86ad7bf2be84c5fc3b46ebc488ff1b578f65487 (diff)
tmp color-ops toolbar (2)
Diffstat (limited to 'modules/pref-labels.php')
-rw-r--r--modules/pref-labels.php30
1 files changed, 21 insertions, 9 deletions
diff --git a/modules/pref-labels.php b/modules/pref-labels.php
index 1c8fd02ad..162592625 100644
--- a/modules/pref-labels.php
+++ b/modules/pref-labels.php
@@ -3,6 +3,19 @@
$subop = $_GET["subop"];
+ if ($subop == "color-set") {
+ $kind = db_escape_string($_REQUEST["kind"]);
+ $ids = split(',', db_escape_string($_REQUEST["ids"]));
+ $color = db_escape_string($_REQUEST["color"]);
+
+ foreach ($ids as $id) {
+ db_query($link, "UPDATE ttrss_labels2 SET
+ ${kind}_color = '$color' WHERE id = '$id'
+ AND owner_uid = " . $_SESSION["uid"]);
+ }
+
+ }
+
if ($subop == "save") {
$id = db_escape_string($_REQUEST["id"]);
@@ -211,19 +224,18 @@
print "<p id=\"labelOpToolbar\">";
- print "<div style='float : right'>";
+ print "<input type=\"submit\" class=\"button\" disabled=\"true\"
+ onclick=\"javascript:removeSelectedLabels()\" value=\"".__('Remove')."\">";
+
+ print "&nbsp;&nbsp;";
print __("Color:");
- print " <input type=\"submit\" class=\"button\" disabled=\"true\"
- onclick=\"\" value=\"".__('Fg')."\">&nbsp;";
+ print "&nbsp;<input type=\"submit\" class=\"button\" disabled=\"true\"
+ onclick=\"labelColorSet('fg')\" value=\"".__('Fg')."\">&nbsp;";
print "<input type=\"submit\" class=\"button\" disabled=\"true\"
- onclick=\"\" value=\"".__('Bg')."\">&nbsp;";
+ onclick=\"labelColorSet('bg')\" value=\"".__('Bg')."\">&nbsp;";
print "<input type=\"submit\" class=\"button\" disabled=\"true\"
- onclick=\"\" value=\"".__('Clear')."\">";
+ onclick=\"labelColorReset()\" value=\"".__('Clear')."\">";
- print "</div>";
-
- print "<input type=\"submit\" class=\"button\" disabled=\"true\"
- onclick=\"javascript:removeSelectedLabels()\" value=\"".__('Remove')."\">";
print "</p>";
} else {