Module: check_mk
Branch: master
Commit: 9b024ba366909b56cc69eaad84e2ebb88f006cb6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9b024ba366909b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Feb 26 15:28:51 2012 +0100
Various layout experiments
---
web/htdocs/check_mk.css | 3 ++
web/htdocs/htmllib.py | 12 ++++++++--
web/htdocs/pages.css | 8 +------
web/htdocs/wato.css | 51 +++++++++++++++++++++++++++++++++++++++++-----
web/htdocs/wato.py | 6 ++--
5 files changed, 61 insertions(+), 19 deletions(-)
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index 1d69e80..ad8de59 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -121,6 +121,8 @@ label.image_button {
background-position: 0 -30px;
padding: 0 0 0 14px;
height: 30px;
+ float: left;
+ margin-right: 5px;
}
label.image_button:hover {
background-position: 0 -60px;
@@ -135,6 +137,7 @@ label.image_button input {
padding-right: 16px;
background: transparent url('images/image_button_r.png') no-repeat;
background-position: right -30px;
+ float: left;
}
label.image_button input:hover {
background-position: right -60px;
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index f422c32..de6c01c 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -312,13 +312,19 @@ class html:
def image_button(self, varname, title, cssclass = ''):
self.write('<label for="%s" class=image_button>' %
varname)
- self.button(varname, title, cssclass)
+ self.raw_button(varname, title, cssclass)
self.write('</label>')
- def button(self, varname, title, cssclass=""):
- self.write("<input type=submit name=\"%s\" id=\"%s\"
value=\"%s\" class=\"%s\">\n" % \
+ def button(self, *args):
+ self.image_button(*args)
+
+ def raw_button(self, varname, title, cssclass=""):
+ self.write("<input onfocus=\"if (this.blur) this.blur();\"
"
+ "type=submit name=\"%s\" id=\"%s\"
value=\"%s\" "
+ "class=\"%s\">\n" % \
( varname, varname, title, cssclass))
+
def buttonlink(self, href, text, add_transid=False, obj_id='',
style='', title='', disabled=''):
if add_transid:
href += "&_transid=%s" % self.fresh_transid()
diff --git a/web/htdocs/pages.css b/web/htdocs/pages.css
index 7674186..0a80530 100644
--- a/web/htdocs/pages.css
+++ b/web/htdocs/pages.css
@@ -358,7 +358,6 @@ table.form.nomargin {
margin: 0;
}
table.form.nomargin td.legend,
-.wato table.form.nomargin td.checkbox,
table.form.nomargin td.content,
table.form.nomargin td.buttons {
border-top-style: none;
@@ -369,11 +368,6 @@ table.form.nomargin td.title {
background-image: url("images/form_background.png");
background-repeat: repeat;
}
-.wato table.form tr.top td,
-.wato table.form tr.top td.checkbox {
- border-top-style: solid;
-}
-
table.form > tbody > tr > td {
padding: 4px 10px;
}
@@ -440,7 +434,7 @@ table.form td.content {
}
td.legend, td.content {
- border: 1px solid #884;
+ /* border: 1px solid #884; */
padding: 2px 0.5ex;
}
diff --git a/web/htdocs/wato.css b/web/htdocs/wato.css
index 71862de..11c40b7 100644
--- a/web/htdocs/wato.css
+++ b/web/htdocs/wato.css
@@ -49,6 +49,8 @@ Boston, MA 02110-1301 USA.
}
.wato table.data th {
-moz-border-radius: 0px;
+ background-color: #508aa1;
+ background-color: #73a1b4;
}
.wato input[type=submit], .wato input[type=button], .wato select {
box-shadow: 0px 0px 1px #888888;
@@ -63,6 +65,10 @@ Boston, MA 02110-1301 USA.
border-left-style: none;
-moz-border-radius: 4px 0px 0px 0px;
}
+.wato table.data td {
+ border-style: dashed;
+}
+
.wato table.data td.select {
text-align: center;
width: 1px;
@@ -72,15 +78,24 @@ Boston, MA 02110-1301 USA.
border-right-style: none;
-moz-border-radius: 0px 4px 0px 0px;
}
+
+/* WATO configuration forms */
.wato table.form {
- width: 850px;
+ width: 100%;
+ /* width: 850px; */
margin-left: 0px;
}
+.wato table.form td {
+ border-style: dashed;
+}
+
.wato table.form td.legend {
- border-right-style: none;
+ width: 300px;
padding-bottom: 8px;
- width: 350px;
+ padding-left: 20px;
+ border-left-style: none;
+ border-right-style: none;
}
.wato table.form td.legend h3 {
@@ -89,9 +104,14 @@ Boston, MA 02110-1301 USA.
font-size: 9pt;
font-weight: normal;
}
+.wato table.form td.title {
+ border-style: none none dashed none;
+}
+
.wato table.form td.title i {
font-weight: normal;
padding-bottom: 8px;
+ border-top-style: solid;
}
@@ -103,19 +123,38 @@ Boston, MA 02110-1301 USA.
.wato table.form td.content {
border-left-style: solid;
- width: 494px;
+ /* width: 494px; */
padding-top: 7px;
padding-bottom: 7px;
+ padding-right: 20px;
+ border-left-style: dashed;
+ border-right-style: none;
+}
+
+.wato table.form td.buttons {
+ border-style: solid none none none;
}
+.wato table.form tr.top td,
+.wato table.form tr.top td,
+.wato table.form tr.top td.checkbox {
+ border-top-style: none;
+}
+
+.wato table.form.nomargin td.checkbox {
+ border-top-style: none;
+}
+
+
.wato table.form td.checkbox {
width: 40px;
height: 40px;
padding-top: 7px;
vertical-align: top;
text-align: right;
- border: 1px solid #fff;
- border-left-style: none;
+ border-width: 1px;
+ border-color: #fff;
+ border-style: dashed none dashed none;
}
.wato div.sitestatus {
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index db4f0f2..d20b63f 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1853,10 +1853,10 @@ def mode_edithost(phase, new, cluster):
configure_attributes({hostname: host}, "host", parent = g_folder)
html.write('<tr><td class="buttons" colspan=3>')
- html.button("save", _("Save & Finish"),
"submit")
+ html.image_button("save", _("Save & Finish"),
"submit")
if not new:
- html.button("delete", _("Delete host!"),
"submit")
- html.button("services", _("Save & go to Services"),
"submit")
+ html.image_button("delete", _("Delete host!"),
"submit")
+ html.image_button("services", _("Save & go to
Services"), "submit")
html.write("</td></tr>\n")
html.write("</table>\n")
html.hidden_fields()