Module: check_mk
Branch: master
Commit: c1f337d050a45920c130509bdb5d95096708cd11
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c1f337d050a459…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Jan 23 15:01:54 2012 +0100
MobileUI: Moved Logout button down
---
web/htdocs/mobile.py | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/mobile.py b/web/htdocs/mobile.py
index a5345e5..647e2de 100644
--- a/web/htdocs/mobile.py
+++ b/web/htdocs/mobile.py
@@ -69,8 +69,8 @@ def mobile_html_head(title, ready_code=""):
def mobile_html_foot():
html.write("</body></html>\n")
-def jqm_header_button(url, title, icon=""):
- html.write('<a href="%s" data-direction="reverse"
data-icon="%s" data-iconpos="notext" title="%s"
></a>' % (url, icon, title ))
+def jqm_header_button(pos, url, title, icon=""):
+ html.write('<a href="%s" class="ui-btn-%s"
data-direction="reverse" data-icon="%s"
data-iconpos="notext" title="%s" ></a>' % (url, pos,
icon, title ))
def jqm_page_header(title, id=None, left_button=None, right_button=None):
idtxt = id and (' id="%s"' % id) or ''
@@ -78,10 +78,10 @@ def jqm_page_header(title, id=None, left_button=None,
right_button=None):
'<div data-role="page"%s>\n'
'<div data-role="header"
data-position="fixed">\n' % idtxt)
if left_button:
- jqm_header_button(*left_button)
+ jqm_header_button("left", *left_button)
html.write('<h1>%s</h1>\n' % title)
if right_button:
- jqm_header_button(*right_button)
+ jqm_header_button("right",*right_button)
html.write('</div>')
html.write('<div data-role="content">\n')
@@ -178,7 +178,7 @@ def page_login():
def page_index():
title = "Check_MK Mobile"
mobile_html_head(title)
- jqm_page_header(title, left_button=("logout.py", "Logout",
"delete"),right_button=("javascript:document.location.reload();",
_("Reload"), "refresh"),id="data")
+ jqm_page_header(title,
right_button=("javascript:document.location.reload();", _("Reload"),
"refresh"),id="data")
views.load_views()
items = []
for view_name, view in html.available_views.items():
@@ -196,6 +196,10 @@ def page_index():
html.write('<ul data-role="listview" data-theme="b"
data-inset="true">\n')
html.write('<li><a data-ajax="false"
data-transition="fade" href="%s">%s</a></li>\n' %
("index.py?mobile=", _("Classical web GUI")))
html.write('</ul>\n')
+
+ html.write('<ul data-role="listview" data-theme="f"
data-inset="true">\n')
+ html.write('<li><a data-ajax="false"
data-transition="fade" href="%s">%s</a></li>\n' %
("logout.py", _("Logout")))
+ html.write('</ul>\n')
mobile_html_foot()
def page_view():