[Zope-CMF] LocalFS and IEeditor...

Paul Everitt paul@zope.com
Wed, 12 Dec 2001 08:33:57 -0500


First, thanks for posting that link!  We need to help him get into the 
CMF.  Have you ever corresponded with him?

Second, have you considered changing the tree slightly to request the 
data out of band of the page, perhaps using XmlHttpRequest?  If you 
could put a server-side python script and page template combo to 
generate a mound of xml -- and even better, cache it -- it might lead to 
  a better experience.

Still, this is a pretty serious refactoring...I outta speak with code on 
this one. :^)

Can you send me a direct note to talk about what you've done?

--Paul

larry_prikockis@NatureServe.org wrote:

> Hi... I'm using S. Babu's ieeditor script
> (vsbabu.org/webdev/zopedev/ieeditor.html) on a site where a large collection
> of documents and images are stored on the filesystem and accessed using the
> LocalFS product.  
> 
> Both of these products work perfectly on their own... however, not being
> content with things as they are, I need to get the ieeditor function that
> allows a user to select and image or a link to traverse the items in the
> LocalFS object...
> 
> Here's where it gets messy.  The portion of editor_browse_images.html (and
> similarly for editor_browse_files...) that creates the tree:
> 
> <dtml-tree  branches_expr="objectValues(['Local File System', 'Portal
> Folder', 'Folder', 'Image'])" nowrap=1 sort=id>
>   <dtml-if "_['id'] != 'list.html' and _['id'] != 'list.inc'">
>   <IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>">
> <dtml-if "meta_type=='Image'">
>   <A HREF="#"
> onClick="top.document.forms[0].elements['ImgUrl'].value=top.document.PREVIEW
> PIC.src='<dtml-var absolute_url>';<dtml-if
> title>top.document.forms[0].elements['AltText'].value='<dtml-var
> "_.string.replace(title,'\'','\\\'')"
> html_quote>';</dtml-if>top.document.forms[0].elements['ImgHeight'].value='<d
> tml-var
> "getProperty('height')">';top.document.forms[0].elements['ImgWidth'].value='
> <dtml-var "getProperty('width')">';"><dtml-var id><dtml-if title> (<dtml-var
> title size="30" html_quote>)</dtml-if></a>
> <dtml-else>
>  <dtml-var id><dtml-if title> (<dtml-var title size="30"
> html_quote>)</dtml-if>
> </dtml-if>
>   </dtml-if>
> </dtml-tree>
> 
> ...doesn't traverse the items in the LocalFS object (since they have
> fileValues, fileIds and fileItems instead of the corresponding "object"
> parameters).  I've had no luck in modifying the <dtml-tree> section to
> properly work with file system objects... though it *seems* that this ought
> to be quite do-able.  
> 
> I'm wondering if anyone has tackled this...
> 
> any thoughts?
> 
> thanks!
> Larry
> 
> +
> Larry J. Prikockis
> Internet Systems Specialist, NatureServe
> Voice:703-908-1833 / Fax:703-908-1917 /
> Email:larry_prikockis@NatureServe.org
> www.NatureServe.org
> +
> All programmers are optimists. Perhaps this modern sorcery especially
> attracts those who believe in happy endings and fairy godmothers. Perhaps
> the hundreds of nitty frustrations drive away all but those who habitually
> focus on the end goal. Perhaps it is merely that computers are young,
> programmers are younger, and the young are always optimists. But however the
> selection process works, the result is indisputable: "This time it will
> surely run," or "I just found the last bug."
> -- Frederick P. Brooks, Jr., The Mythical Man Month
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
> 
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature requests
>