Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
864dbb9f
Commit
864dbb9f
authored
May 21, 2002
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector 396/397: applied patches for better XHTML compatiblity
parent
0a0f97a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
36 deletions
+36
-36
lib/python/DocumentTemplate/DT_Var.py
lib/python/DocumentTemplate/DT_Var.py
+3
-3
lib/python/TreeDisplay/TreeTag.py
lib/python/TreeDisplay/TreeTag.py
+33
-33
No files found.
lib/python/DocumentTemplate/DT_Var.py
View file @
864dbb9f
...
...
@@ -145,8 +145,8 @@ Evaluating expressions without rendering results
'''
# '
__rcs_id__
=
'$Id: DT_Var.py,v 1.5
2 2002/03/27 10:14:02 htrd
Exp $'
__version__
=
'$Revision: 1.5
2
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: DT_Var.py,v 1.5
3 2002/05/21 14:41:41 andreasjung
Exp $'
__version__
=
'$Revision: 1.5
3
$'
[
11
:
-
2
]
from
DT_Util
import
parse_params
,
name_param
,
str
,
ustr
import
os
,
string
,
re
,
sys
...
...
@@ -300,7 +300,7 @@ def url_quote_plus(v, name='(Unknown name)', md={}):
def
newline_to_br
(
v
,
name
=
'(Unknown name)'
,
md
=
{}):
v
=
str
(
v
)
if
v
.
find
(
'
\
r
'
)
>=
0
:
v
=
''
.
join
(
v
.
split
(
'
\
r
'
))
if
v
.
find
(
'
\
n
'
)
>=
0
:
v
=
'<br>
\
n
'
.
join
(
v
.
split
(
'
\
n
'
))
if
v
.
find
(
'
\
n
'
)
>=
0
:
v
=
'<br
/
>
\
n
'
.
join
(
v
.
split
(
'
\
n
'
))
return
v
def
whole_dollars
(
v
,
name
=
'(Unknown name)'
,
md
=
{}):
...
...
lib/python/TreeDisplay/TreeTag.py
View file @
864dbb9f
...
...
@@ -12,8 +12,8 @@
##############################################################################
"""Rendering object hierarchies as Trees
"""
__rcs_id__
=
'$Id: TreeTag.py,v 1.5
1 2002/02/07 18:13:17
andreasjung Exp $'
__version__
=
'$Revision: 1.5
1
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: TreeTag.py,v 1.5
2 2002/05/21 14:41:41
andreasjung Exp $'
__version__
=
'$Revision: 1.5
2
$'
[
11
:
-
2
]
from
DocumentTemplate.DT_Util
import
*
from
DocumentTemplate.DT_String
import
String
...
...
@@ -295,17 +295,17 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
diff
.
append
(
id
)
_td_colspan
=
'<
TD COLSPAN="%s" NOWRAP></TD
>'
_td_single
=
'<
TD WIDTH="16" NOWRAP></TD
>'
_td_colspan
=
'<
td colspan="%s" style="white-space: nowrap"></td
>'
_td_single
=
'<
td width="16" style="white-space: nowrap"></td
>'
sub
=
None
if
substate
is
state
:
output
(
'<
TABLE CELLSPACING
="0">
\
n
'
)
output
(
'<
table cellspacing
="0">
\
n
'
)
sub
=
substate
[
0
]
exp
=
items
else
:
# Add prefix
output
(
'<
TR
>
\
n
'
)
output
(
'<
tr
>
\
n
'
)
# Add +/- icon
if
items
:
...
...
@@ -314,7 +314,7 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
elif
level
>
1
:
output
(
_td_single
*
(
level
-
1
))
output
(
_td_single
)
output
(
'
\
n
'
)
output
(
'<
TD WIDTH="16" VALIGN="TOP" NOWRAP
>'
)
output
(
'<
td width="16" valign="top" style="white-space: nowrap"
>'
)
for
i
in
range
(
len
(
substate
)):
sub
=
substate
[
i
]
if
sub
[
0
]
==
id
:
...
...
@@ -343,14 +343,14 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
if
exp
:
ptreeData
[
'tree-item-expanded'
]
=
1
output
(
'<
A NAME="%s" HREF
="%s?%stree-c=%s#%s">'
'<
IMG SRC="%s/p_/mi" ALT="-" BORDER=0></A
>'
%
output
(
'<
a name="%s" href
="%s?%stree-c=%s#%s">'
'<
img src="%s/p_/mi" alt="-" border="0" /></a
>'
%
(
id
,
root_url
,
param
,
s
,
id
,
script
))
else
:
output
(
'<
A NAME="%s" HREF
="%s?%stree-e=%s#%s">'
'<
IMG SRC="%s/p_/pl" ALT="+" BORDER=0></A
>'
%
output
(
'<
a name="%s" href
="%s?%stree-e=%s#%s">'
'<
img src="%s/p_/pl" alt="+" border="0" /></a
>'
%
(
id
,
root_url
,
param
,
s
,
id
,
script
))
output
(
'</
TD
>
\
n
'
)
output
(
'</
td
>
\
n
'
)
else
:
if
level
>
2
:
output
(
_td_colspan
%
level
)
...
...
@@ -361,12 +361,12 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
# add item text
dataspan
=
colspan
-
level
output
(
'<
TD%s%s VALIGN="TOP" ALIGN="LEFT
">'
%
((
dataspan
>
1
and
(
'
COLSPAN
="%s"'
%
dataspan
)
or
''
),
(
have_arg
(
'nowrap'
)
and
args
[
'nowrap'
]
and
'
NOWRAP
'
or
''
))
output
(
'<
td%s%s valign="top" align="left
">'
%
((
dataspan
>
1
and
(
'
colspan
="%s"'
%
dataspan
)
or
''
),
(
have_arg
(
'nowrap'
)
and
args
[
'nowrap'
]
and
'
style="white-space: nowrap"
'
or
''
))
)
output
(
render_blocks
(
section
,
md
))
output
(
'</
TD>
\
n
</TR
>
\
n
'
)
output
(
'</
td>
\
n
</tr
>
\
n
'
)
if
exp
:
...
...
@@ -385,12 +385,12 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
output
(
doc
(
None
,
md
,
standard_html_header
=
(
'<
TR>%s<TD WIDTH="16" NOWRAP></TD
>'
'<
TD%s VALIGN="TOP
">'
'<
tr>%s<td width="16" style="white-space: nowrap"></td
>'
'<
td%s valign="top
">'
%
(
h
,
(
dataspan
>
1
and
(
'
COLSPAN
="%s"'
%
dataspan
)
(
dataspan
>
1
and
(
'
colspan
="%s"'
%
dataspan
)
or
''
))),
standard_html_footer
=
'</
TD></TR
>'
,
standard_html_footer
=
'</
td></tr
>'
,
))
if
items
==
1
:
...
...
@@ -406,12 +406,12 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
try
:
output
(
doc
(
None
,
md
,
standard_html_header
=
(
'<
TR>%s<TD WIDTH="16" NOWRAP></TD
>'
'<
TD%s VALIGN="TOP
">'
'<
tr>%s<td width="16" style="white-space: nowrap"></td
>'
'<
td%s valign="top
">'
%
(
h
,
(
dataspan
>
1
and
(
'
COLSPAN
="%s"'
%
dataspan
)
or
''
))),
standard_html_footer
=
'</
TD></TR
>'
,
(
'
colspan
="%s"'
%
dataspan
)
or
''
))),
standard_html_footer
=
'</
td></tr
>'
,
))
finally
:
md
.
_pop
(
1
)
elif
have_arg
(
'expand'
):
...
...
@@ -425,12 +425,12 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
try
:
output
(
doc
(
None
,
md
,
standard_html_header
=
(
'<
TR>%s<TD WIDTH="16" NOWRAP></TD
>'
'<
TD%s VALIGN="TOP
">'
'<
tr>%s<td width="16" style="white-space: nowrap"></td
>'
'<
td%s valign="top
">'
%
(
h
,
(
dataspan
>
1
and
(
'
COLSPAN
="%s"'
%
dataspan
)
or
''
))),
standard_html_footer
=
'</
TD></TR
>'
,
(
'
colspan
="%s"'
%
dataspan
)
or
''
))),
standard_html_footer
=
'</
td></tr
>'
,
))
finally
:
md
.
_pop
(
1
)
else
:
...
...
@@ -464,16 +464,16 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
output
(
doc
(
None
,
md
,
standard_html_header
=
(
'<
TR>%s<TD WIDTH="16" NOWRAP></TD
>'
'<
TD%s VALIGN="TOP
">'
'<
tr>%s<td width="16" style="white-space: nowrap"></td
>'
'<
td%s valign="top
">'
%
(
h
,
(
dataspan
>
1
and
(
'
COLSPAN
="%s"'
%
dataspan
)
(
dataspan
>
1
and
(
'
colspan
="%s"'
%
dataspan
)
or
''
))),
standard_html_footer
=
'</
TD></TR
>'
,
standard_html_footer
=
'</
td></tr
>'
,
))
del
diff
[
-
1
]
if
not
diff
:
output
(
'</
TABLE
>
\
n
'
)
if
not
diff
:
output
(
'</
table
>
\
n
'
)
return
data
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment