summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b60058a)
raw | patch | inline | side by side (parent: b60058a)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 21 Feb 2002 06:23:00 +0000 (06:23 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 21 Feb 2002 06:23:00 +0000 (06:23 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@646 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/cgi_client.py | patch | blob | history | |
roundup/htmltemplate.py | patch | blob | history | |
tools/.cvsignore | [new file with mode: 0644] | patch | blob |
diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py
index 164a252d0e696f534e39e5f1489202ad7b011e7d..f816a4732db5c6cfe56b804cb8497d2270929034 100644 (file)
--- a/roundup/cgi_client.py
+++ b/roundup/cgi_client.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: cgi_client.py,v 1.105 2002-02-20 05:52:10 richard Exp $
+# $Id: cgi_client.py,v 1.106 2002-02-21 06:23:00 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
self.env = env
self.path = env['PATH_INFO']
self.split_path = self.path.split('/')
+ url = self.env['SCRIPT_NAME'] + '/'
+ machine = self.env['SERVER_NAME']
+ port = self.env['SERVER_PORT']
+ if port != '80': machine = machine + ':' + port
+ self.base = urlparse.urlunparse(('http', machine, url, None,None,None))
if form is None:
self.form = cgi.FieldStorage(environ=env)
if self.debug:
self.headers_sent = headers
- single_submit_script = '''
+ global_javascript = '''
<script language="javascript">
submitted = false;
function submit_once() {
submitted = true;
return 1;
}
+function help_window(helpurl) {
+ helpwin = window.open(%(base)s + helpurl, 'HelpWindow',
+ 'scrollbars=yes,resizable=yes,toolbar=no,height=400,width=400');
+}
</script>
'''
def pagehead(self, title, message=None):
- url = self.env['SCRIPT_NAME'] + '/'
- machine = self.env['SERVER_NAME']
- port = self.env['SERVER_PORT']
- if port != '80': machine = machine + ':' + port
- base = urlparse.urlunparse(('http', machine, url, None, None, None))
if message is not None:
message = _('<div class="system-msg">%(message)s</div>')%locals()
else:
''')
else:
add_links = ''
- single_submit_script = self.single_submit_script
+ global_javascript = self.global_javascript%self.__dict__
self.write(_('''<html><head>
<title>%(title)s</title>
<style type="text/css">%(style)s</style>
</head>
-%(single_submit_script)s
+%(global_javascript)s
<body bgcolor=#ffffff>
%(message)s
<table width=100%% border=0 cellspacing=0 cellpadding=2>
default_index_filterspec = {'status': ['1', '2', '3', '4', '5', '6', '7']}
def pagehead(self, title, message=None):
- url = self.env['SCRIPT_NAME'] + '/' #self.env.get('PATH_INFO', '/')
- machine = self.env['SERVER_NAME']
- port = self.env['SERVER_PORT']
- if port != '80': machine = machine + ':' + port
- base = urlparse.urlunparse(('http', machine, url, None, None, None))
if message is not None:
message = _('<div class="system-msg">%(message)s</div>')%locals()
else:
''')
else:
add_links = ''
- single_submit_script = self.single_submit_script
+ global_javascript = self.global_javascript%self.__dict__
self.write(_('''<html><head>
<title>%(title)s</title>
<style type="text/css">%(style)s</style>
</head>
-%(single_submit_script)s
+%(global_javascript)s
<body bgcolor=#ffffff>
%(message)s
<table width=100%% border=0 cellspacing=0 cellpadding=2>
#
# $Log: not supported by cvs2svn $
+# Revision 1.105 2002/02/20 05:52:10 richard
+# better error handling
+#
# Revision 1.104 2002/02/20 05:45:17 richard
# Use the csv module for generating the form entry so it's correct.
# [also noted the sf.net feature request id in the change log]
index 92c0937e5e603aab95407b8f92399fd9ca848431..bd28ddcd4fd04d867fce8fe19977f55629ca0378 100644 (file)
--- a/roundup/htmltemplate.py
+++ b/roundup/htmltemplate.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: htmltemplate.py,v 1.77 2002-02-20 05:05:29 richard Exp $
+# $Id: htmltemplate.py,v 1.78 2002-02-21 06:23:00 richard Exp $
__doc__ = """
Template engine.
else:
return _('[Submit: not called from item]')
-
+ def do_classhelp(self, classname, colums):
+ '''pop up a javascript window with class help
+ '''
+ return '<a href="javascript:help_window(\'classhelp?classname=%s&' \
+ 'columns=%s\')"><b>(?)</b></a>'%(classname, columns)
#
# INDEX TEMPLATES
#
#
# $Log: not supported by cvs2svn $
+# Revision 1.77 2002/02/20 05:05:29 richard
+# . Added simple editing for classes that don't define a templated interface.
+# - access using the admin "class list" interface
+# - limited to admin-only
+# - requires the csv module from object-craft (url given if it's missing)
+#
# Revision 1.76 2002/02/16 09:10:52 richard
# oops
#
diff --git a/tools/.cvsignore b/tools/.cvsignore
--- /dev/null
+++ b/tools/.cvsignore
@@ -0,0 +1,3 @@
+*.pyc
+localconfig.py
+build