summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2583876)
svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2672
checkpoint = Checkpoint()
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
def makeErrorPre(old, addition):
if addition is None:
return
Template.database = database
Template.config = config
Template.database = database
Template.config = config
-Template.helppopup = staticmethod(helppopup)
Template.err = None
class JsonDict:
Template.err = None
class JsonDict:
+
+<%!
+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>