m๒ .แธEc@s;dZdklZdklZdklZlZlZdkl Z dk l Z l Z dk l Z dk lZdklZd klZd klZd klZd klZd klZdklZdklZdZgZde e fd„ƒYZ ee ƒdZ!ede"ƒƒZ#ddddd„Z%dS(sSDTML Document objects. $Id: DTMLDocument.py 67823 2006-05-02 09:55:17Z philikon $ (sInitializeClass(stype_converters(sHTMLsDTMLFiles MessageDialog(sguess_content_type(s DTMLMethods decapitate(sPropertyManager(s rfc1123_date(sResourceLockedError(sWriteLockInterface(s SGMLParser(squote(sgetSecurityManager(schange_dtml_methods(schange_dtml_documents(sPathTracebackSupplementtdonet DTMLDocumentcBsฤtZdZefZdZdZeid e ieidZe gZ ei D]/Z e e dejoee dfpe qQ[ ƒZ ddded „Zd ed „Zehed „ZRS( s|DTML Document objects are DocumentTemplate.HTML objects that act as methods whose 'self' is the DTML Document itself.s DTML Documents p_/dtmldociiitChanges100%t20cCsิ|i|ƒ|ii|ƒo |i||||||ƒSn|i ƒo t d‚nt |ƒ|_t|ƒtdƒj o|iƒ}n|i|ƒ|iƒ|o d}|i||d|ƒSndS(sฝ Replaces a Documents contents with Data, Title with Title. The SUBMIT parameter is also used to change the size of the editing area on the default Document edit screen. If the value is "Smaller", the rows and columns decrease by 5. If the value is "Bigger", the rows and columns increase by 5. If any other or no value is supplied, the data gets checked for DTML errors and is saved. s)This document has been locked via WebDAV.tsContent changed.tmanage_tabs_messageN(tselft_validateProxytREQUESTt _size_changesthas_keytSUBMITt_ertdatattitlet dtpref_colst dtpref_rowst wl_isLockedtResourceLockedErrortstrttypetreadtmungetZCacheable_invalidatetmessaget manage_main(RR RR RRRR((t//data/zmath/zope/lib/python/OFS/DTMLDocument.pyt manage_edit:s       RcCsฎ|i|ƒ|iƒo td‚nt|ƒtdƒj o,|o| o td‚n|iƒ}n|i |ƒ|i ƒ|o d}|i ||d|ƒSndS(s;Replace the contents of the document with the text in file.s)This document has been locked via WebDAV.RsNo file specifiedsContent uploaded.RN( RRRRRRtfilet ValueErrorRRRRR(RRRR((Rt manage_uploadTs      cKs-|ip+|idtƒ} | tj o| Sq5nt|f}|iƒ|d<|i |dRAR.((RR4fsL           $&     (R@t __module__t__doc__tWriteLockInterfacet__implements__t meta_typeticont DTMLMethodtmanage_optionstPropertyManagerttuplet_[1]t__ac_permissions__tpermstchange_dtml_methodstchange_dtml_documentsR1RRR4(((RR%s  LsŒ

This is the Document.

sdtml/documentAddRcCs๓t|ƒtdƒj o|iƒ}n|p t}nt|ƒ}t|ƒ}t|d|ƒ}||_|i ||ƒ}|dj ocy|i ƒ}Wn|d}nX|djod|t|ƒf}n|ii|dƒndS(sqAdd a DTML Document object with the contents of file. If 'file' is empty, default document text is used. RR@tURL1s Add and Edit s%s/%ss /manage_mainN(RRRtdefault_dd_htmlRtidRRtobRt _setObjectRR1tDestinationURLtutsubmittquoteR6tredirect(RRTRRRRYRURX((RtaddDTMLDocumentฅs&      N(&RDtGlobalstInitializeClasstZPublisher.Convertersttype_convertersR3tDTMLFilet MessageDialogtzope.contenttypeR?RIR8RKt webdav.commont rfc1123_datetwebdav.LockableRtwebdav.WriteLockInterfaceREtsgmllibt SGMLParserturllibRZt AccessControlR-tAccessControl.PermissionsRPRQtzExceptions.TracebackSupplementR'RR&RRStglobalstaddFormR1R\(R`RiRIReRRERQR\RoR3RSR&RRZRR^RaRbR8R-R?R'RPRK((Rt?s,             t