[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Folder/Views/XUL - __init__.py:1.1.2.1 limit.pt:1.1.2.1 xul.zcml:1.1.2.1
Stephan Richter
srichter@cbu.edu
Fri, 1 Mar 2002 01:37:11 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Folder/Views/XUL
In directory cvs.zope.org:/tmp/cvs-serv10334/Folder/Views/XUL
Added Files:
Tag: srichter-OFS_Formulator-branch
__init__.py limit.pt xul.zcml
Log Message:
Okay, I am finally ready to check this stuff in:
- Reorganized the internal directory structure of every content object. For
each content object you have now a Views directory that contains further
directories for different protocols, such as Browser (HTML), XUL, FTP ...
Note: None of the directories is file-type, but functionality-based. It
is a bad idea to create directories for a particular file type, as
it was common in Zope 2.
- Made Folder, File and Image forms Formulator-based. This allows us now to
create forms for new protocols. such as XUL very quickly (often just a
few lines of code). More to Formulator when it is being checked in.
- Cleaned up most files. Almost all files should have now the correct
license disclaimer.
- A new object called LoadedFolder was added. LoadedFolder currently
provides two new functionalities to folders:
1. Ordering. You can change the order of the objects. This idea was
taking from the Zope 2 product OrderedFolders.
2. Limit. You can specify the maximal amount of items the folder is
allowed to store. This idea was also taken from OrderedFolders.
Note: Due to much rearranging during this development, there are no tests
yet written for this. This needs to be done, before we merge with
the Zoep-3x-branch again.
- Started XUL implementation of screens.
- Fixed some bugs I found lying around.
=== Added File Zope3/lib/python/Zope/App/OFS/Folder/Views/XUL/__init__.py ===
=== Added File Zope3/lib/python/Zope/App/OFS/Folder/Views/XUL/limit.pt ===
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<tal:dummy
replace="python:request.response.setHeader('content-type', 'application/vnd.mozilla.xul+xml')" />
<window id="id-window"
title="Window Title"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
tal:attributes="id string:${container/name}-window;
title container/title">
<description tal:content="container/description">
Form Description
</description>
<html:span tal:repeat="fieldView python:container.getFieldViews(request)">
<label control="some-text" value="Label"
tal:attributes="value python: fieldView.getContext().getValue('title')" />
<textbox tal:content="structure fieldView/render" />
</html:span>
<button id="action" class="dialog" label="Change"
onclick="window.location()" />
</window>
=== Added File Zope3/lib/python/Zope/App/OFS/Folder/Views/XUL/xul.zcml ===
<zopeConfigure
xmlns='http://namespaces.zope.org/zope'
xmlns:security='http://namespaces.zope.org/security'
xmlns:browser='http://namespaces.zope.org/browser'
>
<!-- Loaded Folder View Directives -->
<browser:view name="limit_xul"
for="Zope.App.OFS.IContainerLimit."
factory="Zope.App.OFS.Folder.Views.XUL.FolderLimitEdit." />
<security:protectClass
name="Zope.App.OFS.Folder.Views.XUL.FolderLimitEdit."
permission_id="Zope.ManageContent" methods="index, action" />
<browser:view name="XULLimitFieldView"
for="Zope.App.OFS.IContainerLimit."
factory="Zope.App.OFS.Folder.LoadedFolderFields.LimitField. Zope.App.Formulator.Widgets.XUL.TextWidget." />
</zopeConfigure>