[checkmk-commits] Check_MK Git: check_mk: WATO global settings: fixed styling of non simple valuespecs

git version control git at mathias-kettner.de
Wed Nov 21 14:35:05 CET 2012


Module: check_mk
Branch: master
Commit: 744644af6324081cba5e4f9738bf4ee3ddd01302
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=744644af6324081cba5e4f9738bf4ee3ddd01302

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Wed Nov 14 13:51:52 2012 +0100

WATO global settings: fixed styling of non simple valuespecs

---

 web/htdocs/wato.css |    3 +--
 web/htdocs/wato.py  |    6 +++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/web/htdocs/wato.css b/web/htdocs/wato.css
index 33c56b6..fb19dd9 100644
--- a/web/htdocs/wato.css
+++ b/web/htdocs/wato.css
@@ -764,14 +764,13 @@ div.varname {
     text-decoration: underline;
 }
 
-.wato div.globalvars a.modified {
+.wato div.globalvars td.simple a.modified, .wato div.globalvars a.modified table {
     border-radius: 5px 5px 5px 5px;
     box-shadow: 3px 3px 5px #A2BECD inset;
     margin-left: -5px;
     padding: 0 5px;
 }
 
-
 .wato div.globalvars td.content img.iconbutton {
     width: 60px;
     height: 16px;
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 8146253..3d96acb 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5454,7 +5454,11 @@ def mode_globalvars(phase):
                 to_text = valuespec.value_to_text(current_settings[varname])
             else:
                 to_text = valuespec.value_to_text(defaultvalue)
-            simple = isinstance(valuespec, Checkbox) or "\n" not in to_text
+
+            # Is this a simple (single) value or not? change styling in these cases...
+            simple = True
+            if '\n' in to_text or '<td>' in to_text:
+                simple = False
             forms.section(title, simple=simple)
 
             toggle_url = make_action_link([("mode", "globalvars"), 



More information about the checkmk-commits mailing list