checkpoint = Checkpoint()
-def jquote(string):
- return "'" + string.replace('\\', '\\\\').replace("'", "\\'").replace('\n', '\\n') + "'"
-
-def helppopup(subj):
- """Return HTML code for a (?) link to a specified help topic"""
- return ('<span class="helplink"><a href="help?' +
- cgi.escape(urllib.urlencode(dict(subject=subj, simple='true')))
- +'" target="_blank" ' +
- 'onclick="return helppopup(' + cgi.escape(jquote(subj)) + ')">(?)</a></span>')
-
def makeErrorPre(old, addition):
if addition is None:
return
Template.database = database
Template.config = config
-Template.helppopup = staticmethod(helppopup)
Template.err = None
class JsonDict:
</tr>
% endif
</%def>
+
+<%!
+def jquote(string):
+ return "'" + string.replace('\\', '\\\\').replace("'", "\\'").replace('\n', '\\n') + "'"
+%>
+
+<%def name="helppopup(subj)">
+## Return HTML code for a (?) link to a specified help topic
+<span class="helplink"><a href="help?simple=true;subject=${subj | u}" target="_blank" onclick="return helppopup(${subj | u,jquote})">(?)</a></span>
+</%def>