Module: check_mk
Branch: master
Commit: 01feb58c7489b52a8c3a8d01d3cacaf5d025a08a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=01feb58c7489b5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Jan 31 14:12:48 2016 +0100
Color() can do something on change now
---
web/htdocs/valuespec.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index ed2ba0f..abda1c2 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -3594,11 +3594,9 @@ class Color(ValueSpec):
" function(hex, hsv, rgb) {" \
" document.getElementById(\"%s_value\").value =
hex;" \
"
document.getElementById(\"%s_preview\").style.backgroundColor = hex;" \
- " %s" \
- "}).setHex(\"%s\");</script>" % (varprefix,
varprefix, varprefix,
- self._on_change or "", value)
+ "}).setHex(\"%s\");</script>" % (varprefix,
varprefix, varprefix, value)
- html.popup_trigger(indicator, varprefix + '_popup',
menu_content=menu_content, cssclass="colorpicker")
+ html.popup_trigger(indicator, varprefix + '_popup',
menu_content=menu_content, cssclass="colorpicker", onclose=self._on_change)