Updated new.py for installing Plone 4 without buildout and added an alternative way to insert POD expressions in POD templates via fields (track-changed text still works).

This commit is contained in:
Gaetan Delannay 2010-10-27 12:06:21 +02:00
parent feca97bda3
commit 50c8a139fc
9 changed files with 1841 additions and 1825 deletions

View file

@ -100,8 +100,8 @@ class PodEnvironment(OdfEnvironment):
# For the currently read expression, is there style-related information
# associated with it?
self.exprHasStyle = False
self.gotNamespaces = False # Namespace definitions were not already
# encountered
# Namespace definitions are not already encountered.
self.gotNamespaces = False
# Store inserts
self.inserts = inserts
# Currently walked "if" actions
@ -208,7 +208,8 @@ class PodParser(OdfParser):
e.state = e.IGNORING
elif elem == ('%s:annotation' % officeNs):
e.state = e.READING_STATEMENT
elif elem == ('%s:change-start' % textNs):
elif (elem == ('%s:change-start' % textNs)) or \
(elem == ('%s:conditional-text' % textNs)):
e.state = e.READING_EXPRESSION
e.exprHasStyle = False
else:
@ -280,7 +281,8 @@ class PodParser(OdfParser):
e.currentStatement.append(statementLine)
e.currentContent = ''
elif e.state == e.READING_EXPRESSION:
if elem == ('%s:change-end' % textNs):
if (elem == ('%s:change-end' % textNs)) or \
(elem == ('%s:conditional-text' % textNs)):
expression = e.currentContent.strip()
e.currentContent = ''
# Manage expression

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,2 @@
old = 'OLD'
new = 'NEW'

Binary file not shown.

Binary file not shown.