Module: check_mk
Branch: master
Commit: 3fd899952f6ea4b604622d4bf695aebb8977b82a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3fd899952f6ea4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Apr 12 19:20:45 2017 +0200
Added API methods to add default javascript/css files
Change-Id: Ieac4de0ac232d2d057bcb255eb79efd0f41319e7
---
web/htdocs/htmllib.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 547e0e6..ce74e02 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -1506,6 +1506,16 @@ class html(HTMLGenerator, Encoder, RequestHandler):
self.browser_redirect = url
+ def add_default_stylesheet(self, name):
+ if name not in self._default_stylesheets:
+ self._default_stylesheets.append(name)
+
+
+ def add_default_javascript(self, name):
+ if name not in self._default_javascripts:
+ self._default_javascripts.append(name)
+
+
def immediate_browser_redirect(self, secs, url):
self.javascript("set_reload(%s, '%s');" % (secs, url))