Module: check_mk
Branch: master
Commit: 01c3ff1b159f54ae69e21bde7d5c974e9bdb58ff
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=01c3ff1b159f54…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Jun 3 20:35:14 2012 +0200
Minor layout fix in 2-column Dict ValueSpec
---
web/htdocs/check_mk.css | 4 ++--
web/htdocs/valuespec.py | 8 +++++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index a533478..d6301e4 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -365,10 +365,10 @@ table.dictionary td.dictright {
border-style: none;
}
-div.dictelement * {
+td.dictleft div.dictelement * {
font-size: 8pt;
}
-div.dictelement {
+td.dictleft div.dictelement {
font-size: 8pt;
padding-left: 10px;
border-left: 2px solid #ccc;
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 599995b..250147a 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -1678,7 +1678,7 @@ class Dictionary(ValueSpec):
def render_input_normal(self, varprefix, value):
html.write("<table class=dictionary>")
for param, vs in self._elements:
- html.write("<tr><td class=dictleft>")
+ html.write('<tr><td class=dictleft>')
div_id = varprefix + "_d_" + param
vp = varprefix + "_p_" + param
if self._optional_keys and param not in self._required_keys:
@@ -1690,10 +1690,12 @@ class Dictionary(ValueSpec):
label=vs.title())
else:
visible = True
- html.write(" %s" % vs.title())
+ if vs.title():
+ html.write(" %s" % vs.title())
if self._columns == 2:
- html.write(':')
+ if vs.title():
+ html.write(':')
html.help(vs.help())
html.write('</td><td class=dictright>')
else: