Module: check_mk
Branch: master
Commit: e11a16c1003aa497a42f6727648814b6de7fa9b5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e11a16c1003aa4…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Oct 28 07:58:07 2014 +0100
Fix screenshot mode for normal views
---
web/htdocs/htmllib.py | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 53820a2..2e16bd5 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -747,16 +747,22 @@ class html:
def immediate_browser_redirect(self, secs, url):
self.javascript("setReload(%s, '%s');" % (secs, url))
+ def body_css_classes(self):
+ body_classes = [ "main" ]
+ if self.var("_body_class"):
+ body_classes.append(self.var("_body_class"))
+ if self.screenshotmode:
+ body_classes.append("screenshotmode")
+ return " ".join(body_classes)
+
+ def body_start(self, title='', **args):
+ self.html_head(title, **args)
+ self.write('<body class="%s">' %
self.body_css_classes())
+
def header(self, title='', **args):
if self.output_format == "html":
if not self.header_sent:
- self.html_head(title, **args)
- body_classes = [ "main" ]
- if self.var("_body_class"):
- body_classes.append(self.var("_body_class"))
- if self.screenshotmode:
- body_classes.append("screenshotmode")
- self.write('<body class="%s">' % "
".join(body_classes))
+ self.body_start(title, **args)
self.header_sent = True
if self.render_headfoot:
self.top_heading(title)
@@ -782,10 +788,6 @@ class html:
self.debug_vars(hide_with_mouse = False)
self.end_foldable_container()
- def body_start(self, title='', **args):
- self.html_head(title, **args)
- self.write('<body class="main %s">' %
self.var("_body_class", ""))
-
def bottom_focuscode(self):
if self.focus_object:
formname, varname = self.focus_object