fixed exception in popup when an icon has no title
Message-ID: <55dc60ed.4W+9M7BDdnWuEtnp%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 393039c40b2262d45353bc7e32658ffceeae9c1d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=393039c40b2262…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Aug 25 14:34:47 2015 +0200
custom icons and actions in popup: fixed exception in popup when an icon has no title
---
web/htdocs/views.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 2ed61a0..7ed9456 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2551,7 +2551,10 @@ def ajax_popup_action_menu():
url = 'javascript:void(0)'
html.write('<a href="%s"%s>' % (url, onclick))
html.icon('', icon_name)
- html.write(title)
+ if title:
+ html.write(title)
+ else:
+ html.write(_("No title"))
if url:
html.write('</a>')
else: