summaryrefslogtreecommitdiff
path: root/prefs.js
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 /prefs.js
parentd86ad7bf2be84c5fc3b46ebc488ff1b578f65487 (diff)
tmp color-ops toolbar (2)
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/prefs.js b/prefs.js
index 334bed379..790d4a699 100644
--- a/prefs.js
+++ b/prefs.js
@@ -1968,6 +1968,51 @@ function batchFeedsToggleField(cb, elem, label) {
}
}
+function labelColorReset() {
+ try {
+ var labels = getSelectedLabels();
+
+ var ok = confirm(__("Clear colors of labels?"));
+
+ if (ok) {
+
+ var query = "backend.php?op=pref-labels&subop=color-reset&ids="+
+ param_escape(labels.toString());
+
+ new Ajax.Request(query, {
+ onComplete: function(transport) {
+ labellist_callback2(transport);
+ } });
+ }
+
+ } catch (e) {
+ exception_error("labelColorReset", e);
+ }
+}
+
+function labelColorSet(kind) {
+ try {
+ var labels = getSelectedLabels();
+
+ var p = prompt(__("Please enter new label color:"));
+
+ if (p != null) {
+
+ var query = "backend.php?op=pref-labels&subop=color-set&kind=" + kind +
+ "&ids="+ param_escape(labels.toString()) + "&color=" + param_escape(p);
+
+ new Ajax.Request(query, {
+ onComplete: function(transport) {
+ labellist_callback2(transport);
+ } });
+ }
+
+ } catch (e) {
+ exception_error("labelColorReset", e);
+ }
+}
+
+
/*
function colorPicker(caller, id, fg, bg) {
try {