40 |
_properties=({'id':'title', 'type': 'string', 'mode': 'w'}, |
_properties=({'id':'title', 'type': 'string', 'mode': 'w'}, |
41 |
{'id':'content_type', 'type':'string', 'mode': 'w'}, |
{'id':'content_type', 'type':'string', 'mode': 'w'}, |
42 |
{'id':'encoding', 'type':'string', 'mode': 'w'}, |
{'id':'encoding', 'type':'string', 'mode': 'w'}, |
43 |
|
{'id':'acceptable_encodings', 'type':'tokens', 'mode': 'w'}, |
44 |
{'id':'source_type', 'type':'selection', 'mode': 'w', |
{'id':'source_type', 'type':'selection', 'mode': 'w', |
45 |
'select_variable': 'pt_parser_list'}, |
'select_variable': 'pt_parser_list'}, |
46 |
{'id':'handlers', 'type':'multiple selection', 'mode': 'w', |
{'id':'handlers', 'type':'multiple selection', 'mode': 'w', |
74 |
'pt_editAction', 'pt_setTitle', 'pt_edit', 'pt_expand', |
'pt_editAction', 'pt_setTitle', 'pt_edit', 'pt_expand', |
75 |
'pt_upload', 'pt_changePrefs') |
'pt_upload', 'pt_changePrefs') |
76 |
def pt_editAction(self, REQUEST, title, text, content_type, |
def pt_editAction(self, REQUEST, title, text, content_type, |
77 |
source_type, encoding, handlers=()): |
source_type, encoding, handlers=(), acceptable_encodings=()): |
78 |
"""Change the title and document.""" |
"""Change the title and document.""" |
79 |
if self.wl_isLocked(): |
if self.wl_isLocked(): |
80 |
raise ResourceLockedError, "File is locked via WebDAV" |
raise ResourceLockedError, "File is locked via WebDAV" |
86 |
self.encoding = encoding |
self.encoding = encoding |
87 |
if self.handlers != handlers: |
if self.handlers != handlers: |
88 |
self.handlers = handlers |
self.handlers = handlers |
89 |
|
if self.acceptable_encodings != acceptable_encodings: |
90 |
|
self.acceptable_encodings = acceptable_encodings |
91 |
self.pt_setTitle(title) |
self.pt_setTitle(title) |
92 |
self.pt_edit(text) |
self.pt_edit(text) |
93 |
REQUEST.set('text', self.read()) # May not equal 'text'! |
REQUEST.set('text', self.read()) # May not equal 'text'! |