[Checkins] SVN: CompositePage/trunk/ Integrated the RFA eggification and updated the README.

Shane Hathaway shane at hathawaymix.org
Sat Apr 30 15:48:02 EDT 2011


Log message for revision 121491:
  Integrated the RFA eggification and updated the README.
  

Changed:
  _U  CompositePage/trunk/
  U   CompositePage/trunk/Products/CompositePage/CHANGES.txt
  U   CompositePage/trunk/Products/CompositePage/README.txt
  U   CompositePage/trunk/Products/CompositePage/version.txt
  A   CompositePage/trunk/Products/__init__.py
  A   CompositePage/trunk/README.txt
  A   CompositePage/trunk/setup.py

-=-

Property changes on: CompositePage/trunk
___________________________________________________________________
Added: svn:ignore
   + *.egg-info


Modified: CompositePage/trunk/Products/CompositePage/CHANGES.txt
===================================================================
--- CompositePage/trunk/Products/CompositePage/CHANGES.txt	2011-04-30 19:15:39 UTC (rev 121490)
+++ CompositePage/trunk/Products/CompositePage/CHANGES.txt	2011-04-30 19:48:02 UTC (rev 121491)
@@ -1,8 +1,8 @@
-Next Release
-------------
+1.0 (2011-04-30)
+----------------
 
-- Fixed test failures caused by 7 years of changes to Zope.  This mostly
-  involved simple modernization:
+- Fixed test failures caused by 7 years of changes to Zope and Python.
+  This mostly involved simple modernization:
 
     - Use zope.interface, zope.tales, and zope.pagetemplate rather than
       their predecessors.

Modified: CompositePage/trunk/Products/CompositePage/README.txt
===================================================================
--- CompositePage/trunk/Products/CompositePage/README.txt	2011-04-30 19:15:39 UTC (rev 121490)
+++ CompositePage/trunk/Products/CompositePage/README.txt	2011-04-30 19:48:02 UTC (rev 121491)
@@ -3,34 +3,26 @@
 Contents
 ========
 
-  - Introduction
+- `Introduction`_
+- `How to use CompositePage`_
+- `How to write a template`_
+- `How it works`_
+- `Adapting CompositePage to other applications`_
 
-  - How to use CompositePage
 
-  - How to write a template
 
-  - How it works
-
-  - Adapting CompositePage to other applications
-
-  - Near-term directions
-
-
-
 Introduction
 ============
 
 CompositePage is a new way to assemble pages for the World Wide Web.
-Through the use of Zope technology, browser-based drag and drop, and
+Through the use of Zope page templates, browser-based drag and drop, and
 custom context menus, CompositePage makes it easy to visually combine
 page fragments into complete pages.
 
 CompositePage supercedes the PageDesign product and makes use of
 PDLib, a Javascript library.  CompositePage is designed for browsers
 that support the DOM (Document Object Model) and CSS (Cascading Style
-Sheets) level 2: Mozilla, Internet Explorer 5+, Opera, Konqueror, etc.
-Not all of these browsers have been tested, but it should be possible
-to solve most problems that occur.
+Sheets) level 2: Firefox, Internet Explorer 5+, Opera, Konqueror, etc.
 
 
 
@@ -40,36 +32,36 @@
 Follow these steps:
 
 - Install the CompositePage product in Zope by unpacking the archive
-into your Products directory.  I've tested only with a current Zope
-checkout, which is something like Zope 2.7.
+  into your Products directory.  I've tested only with a current Zope
+  checkout, which is something like Zope 2.7.
 
 - Create a Composite Tool instance in a central location, possibly the
-root folder.
+  root folder.
 
 - Create a Composite object.  On the creation form, there is a
-checkbox for creating a sample template.  Leave the checkbox checked.
+  checkbox for creating a sample template.  Leave the checkbox checked.
 
 - Visit the Composite object and select the "Design" tab.  You should
-see a three-column layout with blue dotted lines in the places where
-you are allowed to insert content.
+  see a three-column layout with blue dotted lines in the places where
+  you are allowed to insert content.
 
 - Click just beneath one of the blue lines.  A context menu will pop
-up.  Select "Add...".
+  up.  Select "Add...".
 
 - You will be directed to a slot (a folderish object.)  In slots, you
-can add composite elements.  Add a composite element that points to a
-script.
+  can add composite elements.  Add a composite element that points to a
+  script.
 
 - Find the composite created earlier and select the "Design" tab
-again.  Your new object should now show up in the slot.
+  again.  Your new object should now show up in the slot.
 
 - Move the object to a different slot using drag and drop.  When the
-mouse cursor is hovering over a permitted target (the blue dotted
-lines are targets), the target will be highlighted.  Let go and watch
-your object appear in the new place.
+  mouse cursor is hovering over a permitted target (the blue dotted
+  lines are targets), the target will be highlighted.  Let go and watch
+  your object appear in the new place.
 
 - Right-click over your object and select "Delete" from the context
-menu.
+  menu.
 
 
 How to write a template
@@ -111,12 +103,35 @@
 case, don't forget to use the ZPT 'structure' keyword, since the
 returned strings contain HTML that should not be escaped.
 
+``slot`` expressions
+--------------------
 
+You can also use the special ``slot`` expression type to define
+slots in a template::
 
+  <html>
+   <head>
+   </head>
+  <body>
+   <div tal:content="slot: center">
+   This will be replaced with elements in the center slot.
+   </div>
+  </body>
+  </html>
+
+This syntax allows the template author to define slot titles
+in addition to slot names.  The template author could write::
+
+  <div tal:content="slot: center 'Page Center'">
+
+The slot title will be shown to page designers.
+
+
 How it works
 ============
 
-Rendering:
+Rendering
+---------
 
 When you render (view) a composite, it calls its template.  When the
 template refers to a slot, the composite looks for the named slot in
@@ -126,7 +141,8 @@
 slot renders and returns its contents.
 
 
-Rendering in edit mode:
+Rendering in edit mode
+----------------------
 
 When requested, the composite calls upon a "UI" object to render its
 template and slots with edit mode turned on.  In edit mode, slots add
@@ -144,7 +160,8 @@
 The result of the transformation is sent back to the browser.
 
 
-Drag and drop:
+Drag and drop
+-------------
 
 At the bottom of a page rendered in edit mode is a call to the
 pd_setupPage() Javascript function.  pd_setupPage() searches all of
@@ -164,7 +181,8 @@
 spot.
 
 
-Context menus:
+Context menus
+-------------
 
 Like drag and drop, context menus depend on pd_setupPage().  When
 pd_setupPage() finds a 'slot_element', a handler adds a context menu
@@ -191,15 +209,4 @@
 the Zope management interface, but mechanisms are provided for
 integrating with any user interface.  Look at design.py, the 'common'
 subdirectory, and the 'zmi' subdirectory for guidance.  Simple
-customizations probably do not require more code than ZMIUI.
-
-
-
-Near-term directions
-====================
-
-I would like CompositePage to work reliably with as many browsers as
-possible, but Mozilla 1.4 is the current reference browser.  Try it in
-your preferred browser.  If it acts strangely, try the same thing in
-Mozilla 1.4 and send an email describing the differences.
-
+customizations probably do not require more code than the ZMI UI.

Modified: CompositePage/trunk/Products/CompositePage/version.txt
===================================================================
--- CompositePage/trunk/Products/CompositePage/version.txt	2011-04-30 19:15:39 UTC (rev 121490)
+++ CompositePage/trunk/Products/CompositePage/version.txt	2011-04-30 19:48:02 UTC (rev 121491)
@@ -1 +1 @@
-CompositePage-0.2
+1.0

Added: CompositePage/trunk/Products/__init__.py
===================================================================
--- CompositePage/trunk/Products/__init__.py	                        (rev 0)
+++ CompositePage/trunk/Products/__init__.py	2011-04-30 19:48:02 UTC (rev 121491)
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)

Added: CompositePage/trunk/README.txt
===================================================================
--- CompositePage/trunk/README.txt	                        (rev 0)
+++ CompositePage/trunk/README.txt	2011-04-30 19:48:02 UTC (rev 121491)
@@ -0,0 +1,7 @@
+Products.CompositePage README
+=============================
+
+This package provides the infrastructure for composing pages from other
+content objects using a drag-and-drop interface.
+
+Please see the README.txt in the package for detailed information.

Added: CompositePage/trunk/setup.py
===================================================================
--- CompositePage/trunk/setup.py	                        (rev 0)
+++ CompositePage/trunk/setup.py	2011-04-30 19:48:02 UTC (rev 121491)
@@ -0,0 +1,48 @@
+import os
+from setuptools import setup
+from setuptools import find_packages
+
+NAME = 'CompositePage'
+
+here = os.path.abspath(os.path.dirname(__file__))
+package = os.path.join(here, 'Products', NAME)
+
+def _package_doc(name):
+    f = open(os.path.join(package, name))
+    return f.read()
+
+_boundary = '\n' + ('-' * 60) + '\n\n'
+README = ( _package_doc('README.txt')
+         + _boundary 
+         + _package_doc('CHANGES.txt')
+         )
+
+setup(name='Products.%s' % NAME,
+      version=_package_doc('version.txt').strip(),
+      description='%s product' % NAME,
+      long_description=README,
+      classifiers=[
+        "Development Status :: 5 - Production/Stable",
+        "Framework :: Plone",
+        "Framework :: Zope2",
+        "Intended Audience :: Developers",
+        "License :: OSI Approved :: Zope Public License",
+        "Programming Language :: Python",
+        "Topic :: Software Development",
+        ],
+      keywords='web application server zope zope2 cmf plone',
+      author="Shane Hathaway",
+      author_email="shane at hathawaymix.org",
+      url="http://pypi.python.org/pypi/Products.%s" % NAME,
+      license="ZPL 2.1 (http://www.zope.org/Resources/License/ZPL-2.1)",
+      packages=find_packages(),
+      include_package_data=True,
+      namespace_packages=['Products'],
+      zip_safe=False,
+      install_requires=['setuptools',
+                       ],
+      tests_require=[],
+      test_suite="Products.%s.tests" % NAME,
+      entry_points="""
+      """,
+      )



More information about the checkins mailing list