Module: check_mk
Branch: master
Commit: bda0cddda2d85964b580da510420b833630b851b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bda0cddda2d859…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Jan 31 14:11:08 2016 +0100
html.image_button now has style attribute
---
web/htdocs/htmllib.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index f50bf3f..5cf7c3d 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -349,15 +349,16 @@ class html(GUITester):
def makeactionuri_contextless(self, addvars, filename=None):
return self.makeuri_contextless(addvars + [("_transid",
self.get_transid())], filename=filename)
- def image_button(self, varname, title, cssclass = ''):
+ def image_button(self, varname, title, cssclass = '', style=None):
if not self.mobile:
- self.write('<label for="%s"
class="image_button">' % self.attrencode(varname))
+ self.write('<label for="%s"
class="image_button"%s>' %
+ (self.attrencode(varname), style and (" style=\"%s\""
% style) or ""))
self.raw_button(varname, title, cssclass)
if not self.mobile:
self.write('</label>')
- def button(self, *args):
- self.image_button(*args)
+ def button(self, *args, **kwargs):
+ self.image_button(*args, **kwargs)
def raw_button(self, varname, title, cssclass=""):