Module: check_mk
Branch: master
Commit: f68ce9783d0ebc7f993cac224622c4c1cf1a5984
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f68ce9783d0ebc…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 29 15:54:32 2015 +0200
New helper function for rendering icon buttons
---
web/htdocs/htmllib.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index d59e481..5510ec4 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -412,6 +412,14 @@ class html:
'onmouseout=\"hilite_icon(this, 0)\">'
'</a>' % (id, onclick, style, target, cssclass, url,
self.attrencode(help), icon))
+ def render_icon_button(self, *args, **kwargs):
+ self.plug()
+ self.icon_button(*args, **kwargs)
+ code = self.drain()
+ self.unplug()
+ return code
+
+
def empty_icon_button(self):
self.write('<img class="iconbutton trans"
src="images/trans.png">')