[checkmk-commits] Check_MK Git: check_mk: New helper function for rendering icon buttons

Mathias Kettner mk at mathias-kettner.de
Wed Apr 29 15:54:36 CEST 2015


Module: check_mk
Branch: master
Commit: f68ce9783d0ebc7f993cac224622c4c1cf1a5984
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f68ce9783d0ebc7f993cac224622c4c1cf1a5984

Author: Mathias Kettner <mk at 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">')
 



More information about the checkmk-commits mailing list