Module: check_mk
Branch: master
Commit: 7f44b832a8fcb297b021dd39f489f8826a4d382e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7f44b832a8fcb2…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 14 15:03:24 2011 +0100
Multisite: fix context button color
---
web/htdocs/htmllib.py | 2 +-
web/htdocs/views.py | 3 ++-
web/plugins/views/mobile.py | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 7d97a3a..08241cf 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -369,7 +369,7 @@ class html:
self.write('<a href="%s"' % url)
if bestof:
self.write(' onmousedown="count_context_button(this);
document.location=this.href; " ')
- self.write('>%s</a></div>' % title)
+ self.write('>%s</a></div>\n' % title)
def context_button_hover_code(self, what):
self.write(r'''onmouseover='this.style.backgroundImage="url(\"images/contextlink%s_hi.png\")";'
''' % what)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 95f23b8..b8abfbe 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1648,7 +1648,8 @@ def show_context_links(thisview, active_filters):
links = collect_context_links(thisview, active_filters)
for view, linktitle, uri, icon, buttonid in links:
- html.context_button(linktitle, uri, icon, buttonid,
bestof=config.context_buttons_to_show)
+ if not view.get("mobile"):
+ html.context_button(linktitle, url=uri, icon=icon, id=buttonid,
bestof=config.context_buttons_to_show)
execute_hooks('buttons-end')
html.end_context_buttons()
diff --git a/web/plugins/views/mobile.py b/web/plugins/views/mobile.py
index d651e38..85d33d8 100644
--- a/web/plugins/views/mobile.py
+++ b/web/plugins/views/mobile.py
@@ -594,7 +594,7 @@ multisite_builtin_views.update({
('log_plugin_output', None),
],
'show_filters': ['logtime'],
- 'sorters': [('log_time', False),
('log_lineno', False],
+ 'sorters': [('log_time', False),
('log_lineno', False)],
'title': _('Events of service')}),
#All Notfications of a contact