Commit 807df31f authored by Jim Fulton's avatar Jim Fulton

Got rid of much of DocumentHandler.

parent 1cf3b637
"""Document object""" """Document object"""
__version__='$Revision: 1.43 $'[11:-2] __version__='$Revision: 1.44 $'[11:-2]
from Globals import HTML, HTMLFile, MessageDialog from Globals import HTML, HTMLFile, MessageDialog
from string import join,split,strip,rfind,atoi from string import join,split,strip,rfind,atoi
...@@ -187,18 +187,19 @@ default_html="""<!--#var standard_html_header--> ...@@ -187,18 +187,19 @@ default_html="""<!--#var standard_html_header-->
the <!--#var title_and_id--> Folder.</P> the <!--#var title_and_id--> Folder.</P>
<!--#var standard_html_footer-->""" <!--#var standard_html_footer-->"""
manage_addDocumentForm=HTMLFile('documentAdd', globals())
class DocumentHandler: def manage_addDocument(self,id,title='',file='',REQUEST=None):
""" """ """ """
manage_addDocumentForm=HTMLFile('documentAdd', globals()) if not file: file=default_html
i=Document(file, __name__=id)
i.title=title
self._setObject(id,i)
if REQUEST is not None: return self.manage_main(self,REQUEST)
return ''
def manage_addDocument(self,id,title='',file='',REQUEST=None): class DocumentHandler:
""" """ """ """
if not file: file=default_html
i=Document(file, __name__=id)
i.title=title
self._setObject(id,i)
if REQUEST: return self.manage_main(self,REQUEST)
def documentIds(self): def documentIds(self):
t=[] t=[]
...@@ -214,17 +215,6 @@ class DocumentHandler: ...@@ -214,17 +215,6 @@ class DocumentHandler:
t.append(getattr(self,i['id'])) t.append(getattr(self,i['id']))
return t return t
def documentItems(self):
t=[]
for i in self.objectMap():
if i['meta_type']=='Document':
n=i['id']
t.append((n,getattr(self,n)))
return t
Globals.default__class_init__(DocumentHandler)
def decapitate(html, RESPONSE=None, def decapitate(html, RESPONSE=None,
header_re=regex.compile( header_re=regex.compile(
'\(\(' '\(\('
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment