Author: jmorliaguet
Date: Thu Oct 13 17:38:52 2005
New Revision: 28264

Added:
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/README.txt   
(contents, props changed)
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/effect/
   
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/effect/__init__.py
      - copied unchanged from r28259, 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/effect.py
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/htmlcleaner/
   
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/htmlcleaner/__init__.py
      - copied unchanged from r28259, 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/htmlcleaner.py
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/layout/
   
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/layout/__init__.py
      - copied unchanged from r28259, 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/layout.py
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/style/
   
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/style/__init__.py
      - copied unchanged from r28259, 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/style.py
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget/
   
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget/__init__.py
      - copied, changed from r28259, 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget.py
   
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget/configure.zcml
      - copied, changed from r28259, 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widgets.zcml
   
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget/interfaces.py
      - copied unchanged from r28259, 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/interfaces.py
   
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget/widgets.css
      - copied unchanged from r28259, 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widgets.css
Removed:
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/effect.py
   
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/htmlcleaner.py
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/interfaces.py
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/layout.py
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/style.py
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget.py
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widgets.css
   z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widgets.zcml
Modified:
   
z3lab/cpsskins/branches/jmo-perspectives/configuration/widgets/metaconfigure.py
   
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/configure.zcml
Log:

- more reshuffling



Modified: 
z3lab/cpsskins/branches/jmo-perspectives/configuration/widgets/metaconfigure.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/configuration/widgets/metaconfigure.py 
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/configuration/widgets/metaconfigure.py 
    Thu Oct 13 17:38:52 2005
@@ -24,8 +24,8 @@
 from zope.publisher.interfaces.browser import IBrowserRequest
 
 from cpsskins.configuration.interfaces import IRegistry
-from cpsskins.engines.common.filters.interfaces import IWidgetView
-from cpsskins.engines.common.filters.interfaces import IBasicWidgetView
+from cpsskins.engines.common.filters.widget.interfaces import IWidgetView
+from cpsskins.engines.common.filters.widget.interfaces import IBasicWidgetView
 
 _ = MessageFactory("cpsskins")
 

Added: z3lab/cpsskins/branches/jmo-perspectives/engines/common/README.txt
==============================================================================
--- (empty file)
+++ z3lab/cpsskins/branches/jmo-perspectives/engines/common/README.txt  Thu Oct 
13 17:38:52 2005
@@ -0,0 +1,3 @@
+
+This package contains features that are likely to be used by several
+renderers.

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/configure.zcml
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/configure.zcml  
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/configure.zcml  
    Thu Oct 13 17:38:52 2005
@@ -1,83 +1,14 @@
 <configure
-    xmlns="http://namespaces.zope.org/cpsskins";
-    xmlns:browser="http://namespaces.zope.org/browser";
-    xmlns:zope="http://namespaces.zope.org/zope";>
+    xmlns="http://namespaces.zope.org/zope";>
 
+    <include package=".widget" />
 
-  <!-- Widget filter: presents data by means of widgets -->
+    <include package=".style" />
 
-  <filter
-      name="widget"
-      predicate="cpsskins.ontology.hasWidget"
-      for="cpsskins.elements.formats.interfaces.IWidget"
-      factory=".widget.WidgetFilter"
-      stylesheet="widgets.css"
-  />
+    <include package=".layout" />
 
-  <browser:page
-      for="*"
-      permission="zope.Public"
-      name="cpsskins_redirect"
-      class=".widget.WidgetView"
-      attribute="redirect"
-  />
-
-  <zope:vocabulary
-     name="WidgetsByType"
-     factory=".widget.WidgetsByTypeVocabulary"
-  />
-
-  <include file="widgets.zcml" />
-
-
-  <!-- HTML Cleaner filter: cleans the html code --> 
-
-  <filter
-      name="htmlcleaner"
-      for="cpsskins.elements.displays.interfaces.IDisplay"
-      factory=".htmlcleaner.HTMLCleaner"
-  />
-
-
-  <!-- Style filter: adds CSS classes to control the style of elements --> 
-
-  <filter
-      name="style"
-      predicate="cpsskins.ontology.hasStyle"
-      for="cpsskins.elements.formats.interfaces.IStyle"
-      factory=".style.StyleFilter"
-  />
-
-
-  <!-- Layout filter: adds inline CSS properties to control the layout of
-       an element --> 
-
-  <filter
-      name="layout"
-      predicate="cpsskins.ontology.hasLayout"
-      for="cpsskins.elements.formats.interfaces.ILayout"
-      factory=".layout.LayoutFilter"
-  />
-
-
-  <!-- Effect filter: transforms images --> 
-
-  <filter
-      name="effect"
-      predicate="cpsskins.ontology.hasEffect"
-      for="cpsskins.elements.formats.interfaces.IEffect"
-      factory=".effect.EffectFilter"
-  />
-
-  <zope:vocabulary
-     name="effects by type"
-     factory=".effect.EffectsByTypeVocabulary"
-  />
-
-  <zope:vocabulary
-     name="web image formats"
-     factory=".effect.WebImageFormatVocabulary"
-  />
+    <include package=".effect" />
 
+    <include package=".htmlcleaner" />
 
 </configure>

Copied: 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget/__init__.py
 (from r28259, 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget.py)
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget.py   
(original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget/__init__.py
  Thu Oct 13 17:38:52 2005
@@ -116,245 +116,6 @@
         return self._preview
 
 
-# Base classes divided into categories.
-
-class HTMLView(WidgetView):
-    """Simple HTML markup wrapped around some content.
-    """
-    _markup = '' # the content will be inserted in %(content)s 
-
-    def __call__(self, data, **kw):
-        content = data.content
-        rendered = self._markup % {'content': content()}
-        # TODO: rendering optional link
-        return rendered
-
-class MenuView(WidgetView):
-    """A menu view display a list of clickable items.
-    """
-    _start = ''     # Optional
-    _repeat = ''    # Mandatory
-    _separator = '' # Optional
-    _end = ''       # Optional
-
-    def __call__(self, data, **kw):
-        content = data.content
-        start = self._start
-        repeat = self._repeat
-        separator = self._separator
-        end = self._end
-
-        rendered = []
-        rendered_append = rendered.append
-        if start:
-            rendered_append(start)
-        for item in content:
-            rendered_append(repeat % {
-                'url': item['url'],
-                'title': item['title'],
-                })
-            if separator:
-                rendered_append(separator)
-        if end:
-            rendered_append(end)
-        # TODO: rendering optional link
-        return ''.join(rendered)
-
-
-# The actual widget views
-
-# Basic views
-
-class BasicHTMLView(WidgetView):
-    """Display the data with minimal formatting.
-    """
-
-    _preview = '<div>' \
-               '<h1 label="H1">Header level 1</h1>' \
-               '<h2 label="H2">Header level 2</h2>' \
-               '<h3 label="H3">Header level 3</h3>' \
-               '<h4 label="H4">Header level 4</h4>' \
-               '<p label="paragraph">Some paragraph</p>' \
-               '</div>'
-
-    def __call__(self, data, **kw):
-        return '<div>%s</div>' % data.content()
-
-class BasicImageView(WidgetView):
-    """Display an image with minimal formatting
-    """
-    def __call__(self, data, **kw):
-        return Image(self.context, self.request)(data)
-
-class BasicItemView(WidgetView):
-    """Display an item with minimal formatting
-    """
-    def __call__(self, data, **kw):
-        content = data.content
-        return '<a href="%s">%s</a>' % (content['url'], content['title'])
-
-class BasicItemsView(WidgetView):
-    """Display a series of items with minimal formatting
-    """
-    def __call__(self, data, **kw):
-        markup = []
-        items_append = markup.append
-        for item in data.content:
-            items_append('<a href="%s">%s</a>' % (item['url'], item['title']))
-        return ''.join(markup)
-
-
-# Advanced views
-
-class Image(WidgetView):
-    """Display an image
-    """
-    _preview = '<img src="#" alt="" style="border: none" />'
-
-    def __call__(self, data, **kw):
-        markup = ''
-        content = data.content
-        url = content.path or content.url
-        if url:
-            markup = '<img src="%s" alt="" style="border: none" />' % url
-        else:
-            markup = '<div>No image</div>' # XXX use an image.
-        # TODO: rendering optional link
-        return markup
-
-class PageBody(HTMLView):
-    """The page's <body> tag
-    """
-    _markup = '<body>%(content)s</body>'
-    _preview = '<body>Page content</body>'
-
-class VerticalMenu(MenuView):
-    _start = '<ul class="verticalMenu">'
-    _repeat = '<li><a href="%(url)s">%(title)s</a></li>'
-    _end = '</ul>'
-    _preview = '<ul label="menu box" class="verticalMenu">' \
-               '<li label="menu item">' \
-               '<a label="link" href="#">First item</a></li>' \
-               '<li label="menu item">' \
-               '<a label="link" href="#">Second item</a></li>' \
-               '<li label="menu item">' \
-               '<a label="link" href="#">Third item</a></li>' \
-               '</ul>'
-
-class HorizontalTabs(MenuView):
-    _start = '<ul class="horizontalTabs">'
-    _repeat = '<li><a href="%(url)s">%(title)s</a></li>'
-    _end = '</ul>'
-    _preview = '<ul label="menu box" class="horizontalTabs">' \
-               '<li label="menu tab">' \
-               '<a label="link" href="#">First item</a></li>' \
-               '<li label="menu tab">' \
-               '<a label="link" href="#">Second item</a></li>' \
-               '<li label="menu tab">' \
-               '<a label="link" href="#">Third item</a></li>' \
-               '</ul>'
-
-class MenuBar(MenuView):
-    _start = '<div class="menuBar">'
-    _repeat = '<a href="%(url)s">%(title)s</a>'
-    _end = '</div>'
-    _preview = '<ul label="menu bar" class="menuBar">' \
-               '<li label="menu item">' \
-               '<a label="link" href="#">First item</a></li>' \
-               '<li label="menu item">' \
-               '<a label="link" href="#">Second item</a></li>' \
-               '<li label="menu item">' \
-               '<a label="link" href="#">Third item</a></li>' \
-               '</ul>'
-
-class HorizontalTrail(MenuView):
-    _start = '<div class="horizontalTrail">'
-    _repeat = '<a href="%(url)s">%(title)s</a>'
-    _separator = '<span class="sep">&gt;</span>'
-    _end = '</div>'
-    _preview = '<div label="box" class="horizontalTrail">' \
-               '<a label="trail item" href="#">First item</a>' \
-               '<span label="separator" class="sep">&gt;</span>' \
-               '<a label="trail item" href="#">Second item</a>' \
-               '<span label="separator" class="sep">&gt;</span>' \
-               '<a label="trail item" href="#">Third item</a>' \
-               '<span label="separator" class="sep">&gt;</span>' \
-               '</div>'
-
-class DropDownList(MenuView):
-    _start = '<form action="@@cpsskins_redirect" method="post">' \
-             '<select onchange="submit()" name="url">' \
-             '<option value="./"></option>'
-    _repeat = '<option value="%(url)s">%(title)s</option>'
-    _end = '</select></form>'
-    _preview = '<form label="selector"><select label="item selector">' \
-               '<option label="list item">First item</option>' \
-               '<option label="list item">Second item</option>' \
-               '<option label="list item">Third item</option>' \
-               '</select></form>'
-
-class FrameBox(HTMLView):
-    _preview = '<fieldset label="box">' \
-               '<legend label="legend">Box title</legend>' \
-               'Sample content.' \
-               '<a label="link" href="#">some link</a>' \
-               '</fieldset>'
-
-    def __call__(self, data, **kw):
-        title = data.title
-        return '<fieldset><legend>%s</legend>%s</fieldset>' % (
-                title, BasicHTMLView(self.context, self.request)(data))
-
-
-class HorizontalScrollBar(HTMLView):
-    """Display horizontal scroll bars in case of horizontal overflow
-    """
-    _markup = '<div style="overflow-x:scroll;">%(content)s</div>'
-    _preview = '<div label="box" style="overflow-x:scroll;">Box content</div>'
-
-class TableFrame(HTMLView):
-    """Display a <table><tr> tag
-    """
-    _markup = '<table summary=""><tr>%(content)s</tr></table>'
-    _preview = '<table summary="" label="table frame">' \
-               '<tbody inactive="1"><tr inactive="1">' \
-               '<td inactive="1">Sample content</td>' \
-               '</tr></tbody></table>'
-
-class TableCell(HTMLView):
-    """Display a <td> tag
-    """
-    _markup = '<td style="vertical-align:top;">%(content)s</td>'
-    _preview = '<table summary="" ignore="1" inactive="1">' \
-               '<tbody ignore="1" inactive="1">' \
-               '<tr ignore="1" inactive="1">' \
-               '<td label="cell">Cell content</td>' \
-               '</tr></tbody></table>'
-
-class DivFrame(HTMLView):
-    """Display a <div> frame
-    """
-    _markup = '<div>%(content)s<br style="clear:left"/></div>' \
-              '<div style="clear:left"></div>'
-    _preview = '<div label="frame box">Frame content</div>'
-
-class DivCell(HTMLView):
-    """Display a floating <div> cell
-    """
-    _markup = '<div style="float:left;overflow-x:hidden">%(content)s</div>'
-    _preview = '<div label="cell">Cell content</div>'
-
-class MonthlyCalendar(WidgetView):
-    """Display a monthly calendar
-    """
-    _markup = 'Not done yet'
-    _preview = '<table label="calendar" class="calendar">' \
-               '<thead><tr label="header">' \
-               '<th>Mo</th><th>Tu</th><th>We</th><th>Th</th>' \
-               '<th>Fr</th><th>Sa</th><th>Su</th></tr></thead>' \
-               '<tbody></tbody></table>'
-
-
 def WidgetsByTypeVocabulary(context):
     """A vocabulary that contains the list of widgets in a given category.
     """

Copied: 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget/configure.zcml
 (from r28259, 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widgets.zcml)
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widgets.zcml    
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/common/filters/widget/configure.zcml
       Thu Oct 13 17:38:52 2005
@@ -1,172 +1,31 @@
 <configure
-    xmlns:zope="http://namespaces.zope.org/zope";
-    xmlns="http://namespaces.zope.org/cpsskins";>
+    xmlns="http://namespaces.zope.org/cpsskins";
+    xmlns:browser="http://namespaces.zope.org/browser";
+    xmlns:zope="http://namespaces.zope.org/zope";>
 
-  <!-- Plain widget views -->
+  <!-- Widget filter: presents data by means of widgets -->
 
-  <widget
-      id="plain_html"
-      type=".interfaces.IBasicWidgetView"
-      model="cpsskins.model.interfaces.IHTML"
-      factory=".widget.BasicHTMLView"
-      title="Basic HTML view"
+  <filter
+      name="widget"
+      predicate="cpsskins.ontology.hasWidget"
+      for="cpsskins.elements.formats.interfaces.IWidget"
+      factory=".WidgetFilter"
+      stylesheet="widgets.css"
   />
 
-  <widget
-      id="plain_image"
-      type=".interfaces.IBasicWidgetView"
-      model="cpsskins.model.interfaces.IImage"
-      factory=".widget.BasicImageView"
-      title="Basic image view"
+  <browser:page
+      for="*"
+      permission="zope.Public"
+      name="cpsskins_redirect"
+      class=".WidgetView"
+      attribute="redirect"
   />
 
-  <widget
-      id="plain_item"
-      type=".interfaces.IBasicWidgetView"
-      model="cpsskins.model.interfaces.IItem"
-      factory=".widget.BasicItemView"
-      title="Basic item view"
+  <zope:vocabulary
+     name="WidgetsByType"
+     factory=".WidgetsByTypeVocabulary"
   />
 
-  <widget
-      id="plain_items"
-      type=".interfaces.IBasicWidgetView"
-      model="cpsskins.model.interfaces.IItems"
-      factory=".widget.BasicItemsView"
-      title="Basic items view"
-  />
-
-
-  <!-- Page widget views -->
-
-  <widget
-      id="page_body"
-      type=".interfaces.IPageView"
-      model="cpsskins.model.interfaces.IHTML"
-      title="Page body"
-      factory=".widget.PageBody"
-  />
-
-
-  <!-- Frame widget views -->
-
-  <widget
-      id="table_frame"
-      type=".interfaces.IFrameView"
-      model="cpsskins.model.interfaces.IHTML"
-      title="Table frame"
-      factory=".widget.TableFrame"
-  />
-
-  <widget
-      id="div_frame"
-      type=".interfaces.IFrameView"
-      model="cpsskins.model.interfaces.IHTML"
-      title="Div frame"
-      factory=".widget.DivFrame"
-  />
-
-
-  <!-- Cell widget views -->
-
-  <widget
-      id="table_cell"
-      type=".interfaces.ICellView"
-      model="cpsskins.model.interfaces.IHTML"
-      title="Table cell"
-      factory=".widget.TableCell"
-  />
-
-  <widget
-      id="div_cell"
-      type=".interfaces.ICellView"
-      model="cpsskins.model.interfaces.IHTML"
-      title="Div cell"
-      factory=".widget.DivCell"
-  />
-
-  <widget
-      id="horizontal_scrollbar"
-      type=".interfaces.ICellView"
-      model="cpsskins.model.interfaces.IHTML"
-      title="Horizontal scroll bar"
-      factory=".widget.HorizontalScrollBar"
-  />
-
-
-  <!-- Menu widget views -->
-
-  <widget
-      id="vertical_menu"
-      type=".interfaces.IMenuView"
-      model="cpsskins.model.interfaces.IItems"
-      title="Vertical menu"
-      factory=".widget.VerticalMenu"
-  />
-
-  <widget
-      id="horizontal_tabs"
-      type=".interfaces.IMenuView"
-      model="cpsskins.model.interfaces.IItems"
-      title="Horizontal tabs"
-      factory=".widget.HorizontalTabs"
-  />
-
-  <widget
-      id="menu_bar"
-      type=".interfaces.IMenuView"
-      model="cpsskins.model.interfaces.IItems"
-      title="Menu bar"
-      factory=".widget.MenuBar"
-  />
-
-  <widget
-      id="horizontal_trail"
-      type=".interfaces.IMenuView"
-      model="cpsskins.model.interfaces.IItems"
-      title="Horizontal trail"
-      factory=".widget.HorizontalTrail"
-  />
-
-  <widget
-      id="dropdown_list"
-      type=".interfaces.IMenuView"
-      model="cpsskins.model.interfaces.IItems"
-      title="Drop-down list"
-      factory=".widget.DropDownList"
-  />
-
-
-  <!-- Plain views -->
-
-  <widget
-      id="frame_box"
-      type=".interfaces.IPlainView"
-      model="cpsskins.model.interfaces.IHTML"
-      title="Frame box"
-      factory=".widget.FrameBox"
-  />
-
-
-  <!-- Calendar widget views -->
-
-  <widget
-      id="monthly_calendar"
-      type=".interfaces.ICalendarView"
-      model="cpsskins.model.interfaces.IItems"
-      title="Monthly calendar"
-      factory=".widget.MonthlyCalendar"
-  />
-
-
-  <!-- Image widget views -->
-
-  <widget
-      id="image"
-      type=".interfaces.IImageView"
-      model="cpsskins.model.interfaces.IImage"
-      title="Image"
-      factory=".widget.Image"
-  />
+  <include file="widgets.zcml" />
 
 </configure>
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to