Mercurial > p > roundup > code
changeset 4783:365deccf7347
issue2550807 enhance classhelp method with ability to set html properties
on the generated link.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 24 Apr 2013 23:13:58 -0400 |
| parents | cda9ca8befd7 |
| children | 888676704342 |
| files | roundup/cgi/templating.py |
| diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Tue Apr 23 23:10:19 2013 -0400 +++ b/roundup/cgi/templating.py Wed Apr 24 23:13:58 2013 -0400 @@ -640,7 +640,8 @@ def classhelp(self, properties=None, label=''"(list)", width='500', height='400', property='', form='itemSynopsis', - pagesize=50, inputtype="checkbox", sort=None, filter=None): + pagesize=50, inputtype="checkbox", html_kwargs={}, + sort=None, filter=None): """Pop up a javascript window with class help This generates a link to a popup window which displays the @@ -704,8 +705,9 @@ sort, pagesize, filter) onclick = "javascript:help_window('%s', '%s', '%s');return false;" % \ (help_url, width, height) - return '<a class="classhelp" href="%s" onclick="%s">%s</a>' % \ - (help_url, onclick, self._(label)) + return '<a class="classhelp" href="%s" onclick="%s" %s>%s</a>' % \ + (help_url, onclick, cgi_escape_attrs(**html_kwargs), + self._(label)) def submit(self, label=''"Submit New Entry", action="new"): """ Generate a submit button (and action hidden element)
