Module: check_mk
Branch: master
Commit: 01badcd858c5181c4371c021bec2eddaeb49a9bc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=01badcd858c518…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 24 10:18:08 2012 +0200
Layout fixes for mobile GUI
---
web/htdocs/check_mk.css | 31 +++----------------------------
web/htdocs/mobile.css | 14 ++++++++++++++
web/htdocs/pages.css | 30 ++++++++++++++++++++++++++++++
web/plugins/views/filters.py | 11 +++++++----
4 files changed, 54 insertions(+), 32 deletions(-)
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index aa94eb2..958bbd9 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -25,6 +25,9 @@ Boston, MA 02110-1301 USA.
*/
+/* Global style used by all HTML pages, even by sidebar and
+ mobile interface */
+
/*-------------------------------------------------------------------------.
| ____ __ _ _ |
| | _ \ ___ / _| __ _ _ _| | |_ ___ |
@@ -87,34 +90,6 @@ input, select, textarea {
margin-top: 0px;
}
-input[type=text] {
- box-shadow: 0.1px 1.2px 1.8px 0 #888 inset;
- position: relative;
-}
-input[type=password] {
- box-shadow: 0.1px 1.2px 1.8px 0 #800 inset;
-}
-input[type=text],input[type=text] {
- height: 18px;
- padding: 2px 3px;
- vertical-align: middle;
-/* top: -2px; */
-}
-select {
- height: 22px;
-}
-
-input[type=radio] {
- margin-left: 0px;
-}
-input[type=checkbox] {
- margin-left: 0px;
-}
-
-select {
- padding: 1px 3px;
-}
-
form {
margin: 0px;
}
diff --git a/web/htdocs/mobile.css b/web/htdocs/mobile.css
index 2668776..55aefd5 100644
--- a/web/htdocs/mobile.css
+++ b/web/htdocs/mobile.css
@@ -108,6 +108,20 @@ body.mobile table.form th {
border-style: none;
}
+body.mobile table.filtertime td {
+ vertical-align: middle;
+}
+body.mobile table.filtertime div {
+}
+body.mobile table.filtertime div.ui-select {
+ width: auto;
+}
+body.mobile table.alertstatefilter td {
+ vertical-align: top;
+}
+body.mobile table.alertstatefilter .ui-checkbox {
+ margin: 0;
+}
/* Perfometers */
diff --git a/web/htdocs/pages.css b/web/htdocs/pages.css
index c823e5c..9518ad5 100644
--- a/web/htdocs/pages.css
+++ b/web/htdocs/pages.css
@@ -362,6 +362,36 @@ img.iconbutton.trans {
| Input forms (e.g. Filters, Commands, WATO) |
'-------------------------------------------------------------------------*/
+input[type=text] {
+ box-shadow: 0.1px 1.2px 1.8px 0 #888 inset;
+ position: relative;
+}
+
+input[type=password] {
+ box-shadow: 0.1px 1.2px 1.8px 0 #800 inset;
+}
+input[type=text],input[type=text] {
+ height: 18px;
+ padding: 2px 3px;
+ vertical-align: middle;
+/* top: -2px; */
+}
+select {
+ height: 22px;
+}
+
+input[type=radio] {
+ margin-left: 0px;
+}
+input[type=checkbox] {
+ margin-left: 0px;
+}
+
+select {
+ padding: 1px 3px;
+}
+
+
h2.formcaption {
font-size: 100%;
margin-bottom: 0px;
diff --git a/web/plugins/views/filters.py b/web/plugins/views/filters.py
index 6a7fdb1..45a7fc3 100644
--- a/web/plugins/views/filters.py
+++ b/web/plugins/views/filters.py
@@ -394,7 +394,7 @@ class FilterTime(Filter):
html.write("<tr><td>%s:</td>" % whatname)
html.write("<td>")
html.text_input(varprefix, style="width: 116px;")
- html.write(" ")
+ html.write("</td><td>")
html.select(varprefix + "_range", choices, "3600")
html.write("</td></tr>")
html.write("</table>")
@@ -544,15 +544,18 @@ class FilterLogState(Filter):
return True
def display(self):
- html.write("<table><tr><td>")
+ html.write("<table class=alertstatefilter><tr><td>")
+ html.begin_checkbox_group()
for varsuffix, what, state, text in self._items:
if state == 0:
html.write("<u>%s:</u></td><td>" %
(_(what.title())))
html.write(" ")
- html.checkbox("logst_" + varsuffix, True)
- html.write(" " + text + "<br>")
+ html.checkbox("logst_" + varsuffix, True, label=text)
+ if not html.mobile:
+ html.write("<br>")
if varsuffix == "h2":
html.write("</td><td>")
+ html.end_checkbox_group()
html.write("</td></tr></table>")
def filter(self, infoname):