Author: jmorliaguet
Date: Sat Oct 29 21:07:19 2005
New Revision: 28804

Added:
   
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/cell.pt  
 (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/dispatcher.py
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/pageblock.pt
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/portlet.pt
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/slot.pt  
 (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/theme.pt 
  (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/themepage.pt
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/cell.pt 
  (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/dispatcher.py
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/pageblock.pt
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/portlet.pt
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/slot.pt 
  (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/theme.pt
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/themepage.pt
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/cell.pt   
(contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/dispatcher.py
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/pageblock.pt
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/portlet.pt
   (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/slot.pt   
(contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/theme.pt  
 (contents, props changed)
   
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/themepage.pt
   (contents, props changed)
Modified:
   
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/configure.zcml
   
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/content/__init__.py
   
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/page/__init__.py
   z3lab/cpsskins/branches/jmo-perspectives/browser/manager/themes_manager.pt
   z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.css
   z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.js
   z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/configure.zcml
   
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/configure.zcml
   z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/configure.zcml
Log:

- more cleanup / decoupling



Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/configure.zcml
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/configure.zcml 
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/configure.zcml 
    Sat Oct 29 21:07:19 2005
@@ -18,13 +18,13 @@
   <!-- Slot editor -->
 
   <cpsskins:filter
-      name="slot editor (page authoring)"
+      name="slot editor (page designer)"
       for="cpsskins.elements.interfaces.IDisplay"
       factory=".page.EditorFilter"
   />
 
   <cpsskins:filter
-      name="slot editor (content authoring)"
+      name="slot editor (content author)"
       for="cpsskins.elements.interfaces.IDisplay"
       factory=".content.EditorFilter"
   />
@@ -32,13 +32,13 @@
   <!-- Portlet editor -->
 
   <cpsskins:filter
-      name="portlet editor (page authoring)"
+      name="portlet editor (page designer)"
       for="cpsskins.elements.interfaces.IDisplay"
       factory=".page.EditorFilter"
   />
 
   <cpsskins:filter
-      name="portlet editor (content authoring)"
+      name="portlet editor (content author)"
       for="cpsskins.elements.interfaces.IDisplay"
       factory=".content.EditorFilter"
   />
@@ -80,7 +80,7 @@
 
   <page
       for="cpsskins.elements.interfaces.ISlot"
-      name="editor (page authoring)"
+      name="editor (page designer)"
       template="page/slot_edit.pt"
       permission="zope.Public"
       class="..editing.Editing"
@@ -88,7 +88,7 @@
 
   <page
       for="cpsskins.elements.interfaces.ISlot"
-      name="editor (content authoring)"
+      name="editor (content author)"
       template="content/slot_edit.pt"
       permission="zope.Public"
       class="..editing.Editing"
@@ -99,7 +99,7 @@
 
   <page
       for="cpsskins.elements.interfaces.IPortlet"
-      name="editor (page authoring)"
+      name="editor (page designer)"
       template="page/portlet_edit.pt"
       permission="zope.Public"
       class="..editing.Editing"
@@ -107,7 +107,7 @@
 
   <page
       for="cpsskins.elements.interfaces.IPortlet"
-      name="editor (content authoring)"
+      name="editor (content author)"
       template="content/portlet_edit.pt"
       permission="zope.Public"
       class="..editing.Editing"

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/content/__init__.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/content/__init__.py
        (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/content/__init__.py
        Sat Oct 29 21:07:19 2005
@@ -38,5 +38,5 @@
         """Apply the editor.
         """
         editor = getMultiAdapter((info.element, info.globals.request),
-            name='editor (content authoring)')
+            name='editor (content author)')
         return editor(markup=markup, info=info)

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/page/__init__.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/page/__init__.py
   (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/filters/page/__init__.py
   Sat Oct 29 21:07:19 2005
@@ -38,5 +38,5 @@
         """Apply the editor to the element.
         """
         editor = getMultiAdapter((info.element, info.globals.request),
-            name='editor (page authoring)')
+            name='editor (page designer)')
         return editor(markup=markup, info=info)

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/manager/themes_manager.pt
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/browser/manager/themes_manager.pt  
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/browser/manager/themes_manager.pt  
Sat Oct 29 21:07:19 2005
@@ -8,7 +8,7 @@
             <tal:block define="theme_url theme/url">
               <a href=""
                tal:content="theme/id"
-               tal:attributes="href 
string:/++skin++cpsskins$theme_url/@@page-authoring.html" />
+               tal:attributes="href 
string:/++skin++cpsskins$theme_url/@@page-designer.html" />
               (<span tal:content="theme/title" />)
             </tal:block>
           </li>

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.css
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.css    
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.css    
Sat Oct 29 21:07:19 2005
@@ -21,7 +21,7 @@
   left: 0;
   width: 100%;
   background: #aaa;
-  height: 60px;
+  height: 55px;
   z-index: 10;
 }
 
@@ -68,25 +68,24 @@
 
 /* toolbar buttons */
 .actionPad {
-  padding-top: 11px;
-  padding-left: 6px;
+  padding-top: 10px;
+  padding-left: 5px;
 }
 
 .actionPad a {
-  font: bold 12px Arial, sans-serif;
+  font: 12px Arial, sans-serif;
   color: #000 !important;
-  background: #ffffff;
+  background: #fff;
   text-decoration: none;
   border: 1px;
   border-style: solid;
-  border-color: #ccc #333 #333 #ccc;
-  padding: 2px;
+  border-color: #999 #333 #333 #999;
+  padding: 3px 5px 3px 5px;
   margin: 0;
 }
 
-.actionPad a.selected,
-.actionPad a:hover {
-  background: #ff0;
+.actionPad a.selected, .actionPad a:hover {
+  background: #ffc;
   border-width: 1px;
   border-style: solid;
   border-color: #333 #ccc #ccc #333;
@@ -219,8 +218,8 @@
 
 .perspective {
   position: absolute;
-  right: 15px;
-  top: 10px;
+  right: 8px;
+  top: 8px;
   font: 11px Verdana, Arial, Helvetica, sans-serif;
   background-image: url(/++skin++cpsskins/@@/perspective-12.png);
   background-repeat: no-repeat;

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.js
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.js     
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.js     
Sat Oct 29 21:07:19 2005
@@ -89,7 +89,7 @@
 function render_element(id) {
   var rendered = themeEditor.renderElement(
     id = id,
-    engine = 'page-authoring',
+    engine = 'page-designer',
   );
   var tag = getFirstTag(rendered);
   var wrapper = document.createElement(tag);

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/configure.zcml
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/configure.zcml   
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/configure.zcml   
    Sat Oct 29 21:07:19 2005
@@ -20,6 +20,11 @@
       layer="cpsskins"
   />
 
+  <browser:resource
+      name="content_author.css" file="content_author.css"
+      layer="cpsskins"
+  />
+
   <browser:menuItems
       menu="cpsskins_authoring_actions"
       for="*">

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/cell.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/cell.pt  
    Sat Oct 29 21:07:19 2005
@@ -0,0 +1,23 @@
+<td class="editable" style="vertical-align:top"
+  tal:define="
+    info options/info;
+    globals nocall:info/globals;
+    display info/display;
+    perspective globals/perspective;
+    formats display/formattable:getFormatNames;
+    title context/title;
+    id view/getId;
+    layout nocall:options/layout;
+    layout_id layout/identifier;
+    width layout/width"
+  tal:attributes="
+    editable python:1;
+    formattable python: formats and 1 or 0;
+    formats python: ' '.join(formats);
+    id id;
+    width width;">
+
+  <div class="container" focus="1"
+       tal:content="structure options/markup" />
+
+</td>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/dispatcher.py
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/dispatcher.py
        Sat Oct 29 21:07:19 2005
@@ -0,0 +1,42 @@
+##############################################################################
+#
+# Copyright (c) 2005 Nuxeo and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+
+from zope.component import adapts, getMultiAdapter
+from zope.interface import implements
+
+from cpsskins.browser.rendering.interfaces import IFilter
+from cpsskins.elements.interfaces import IDisplay
+
+class Dispatcher(object):
+    """Editor dispatcher for the content author engine
+
+    The element must provide a page named 'editor (content author)'
+    """
+    adapts(IDisplay)
+    implements(IFilter)
+
+    def __init__(self, context):
+        self.context = context
+
+    def __call__(self, markup, info):
+        """Apply the editor.
+        """
+        editor = getMultiAdapter((info.element, info.globals.request),
+            name='editor (content author)')
+        return editor(markup=markup, info=info)

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/pageblock.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/pageblock.pt
 Sat Oct 29 21:07:19 2005
@@ -0,0 +1,18 @@
+<tal:block
+  define="
+    info options/info;
+    globals info/globals;
+    display info/display;
+    perspective globals/perspective;
+    formats display/formattable:getFormatNames;
+    title context/title;
+    layout nocall:options/layout;
+    this_id view/getId;
+    layout_id layout/identifier;
+    width layout/width">
+
+  <table cellpadding="0" cellspacing="0" tal:attributes="width width">
+    <tr tal:content="structure options/markup" />
+  </table>
+
+</tal:block>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/portlet.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/portlet.pt
   Sat Oct 29 21:07:19 2005
@@ -0,0 +1,23 @@
+<div
+  tal:define="
+    parent view/getParent;
+    info options/info;
+    perspective info/perspective;
+    display info/display;
+    getDisplay nocall:context/displayable:getDisplay;
+    actual_display python: getDisplay(perspective);
+    formats actual_display/formattable:getFormatNames|python:[];
+    parent_type parent/type:elementtype;
+    editable python: str(parent_type) == 'ISlot' and 1 or 0;
+    title context/title;
+    id view/getId;"
+  tal:attributes="
+    editable editable;
+    formattable python: formats and 1 or 0;
+    formats python: ' '.join(formats);
+    class python: editable and 'editable draggable hover' or nothing;
+    id id">
+
+  <div tal:content="structure options/markup" />
+
+</div>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/slot.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/slot.pt  
    Sat Oct 29 21:07:19 2005
@@ -0,0 +1,15 @@
+<tal:block define="
+  markup options/markup;
+  slot_title context/title;
+  slot_name context;
+  id view/getId;
+  icon view/getIcon">
+
+  <div class="slotFrame container" render="1"
+       tal:attributes="id id">
+    <div class="title" tal:content="slot_title|slot_name" />
+    <div class="body" tal:condition="markup"
+         tal:content="structure markup" />
+  </div>
+
+</tal:block>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/theme.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/theme.pt 
    Sat Oct 29 21:07:19 2005
@@ -0,0 +1 @@
+<tal:block content="structure options/markup" />

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/themepage.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/filters/themepage.pt
 Sat Oct 29 21:07:19 2005
@@ -0,0 +1,3 @@
+<div tal:define="id view/getId"
+     tal:attributes="id id"
+     tal:content="structure options/markup" />

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/configure.zcml
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/configure.zcml  
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/configure.zcml  
    Sat Oct 29 21:07:19 2005
@@ -11,6 +11,20 @@
       layer="cpsskins"
   />
 
+  <browser:page
+      name="layout-designer.html"
+      class=".Authoring"
+      for="cpsskins.elements.interfaces.IThemePage"
+      template="layout_designer.pt"
+      permission="zope.Public"
+      layer="cpsskins"
+  />
+
+  <browser:resource
+      name="layout_designer.css" file="layout_designer.css"
+      layer="cpsskins"
+  />
+
   <browser:menuItems
       menu="cpsskins_authoring_actions"
       for="*">

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/cell.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/cell.pt 
    Sat Oct 29 21:07:19 2005
@@ -0,0 +1,40 @@
+<td class="editable" style="vertical-align:top"
+  tal:define="
+    info options/info;
+    globals nocall:info/globals;
+    display info/display;
+    perspective globals/perspective;
+    formats display/formattable:getFormatNames;
+    title context/title;
+    id view/getId;
+    layout nocall:options/layout;
+    layout_id layout/identifier;
+    width layout/width"
+  tal:attributes="
+    editable python:1;
+    formattable python: formats and 1 or 0;
+    formats python: ' '.join(formats);
+    id id;
+    width width;">
+
+  <div class="cellEditHeader shiftable" constraint="horizontal">
+    <form action="javascript:void(0)" grip="1">
+      <input name="title" type="text" size="12" class="editable"
+       tal:attributes="value title;
+                       model_id id" />
+    </form>
+  </div>
+
+  <form class="sizer" action="javascript:void(0)">
+    <b class="left"></b>
+    <b class="right"></b>
+    <input class="input editable" name="width" type="text" size="4"
+    tal:attributes="value python: width and width or '?';
+                    model_id layout_id;
+                    view_id id" />
+  </form>
+
+  <div class="container" focus="1"
+       tal:content="structure options/markup" />
+
+</td>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/dispatcher.py
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/dispatcher.py
       Sat Oct 29 21:07:19 2005
@@ -0,0 +1,42 @@
+##############################################################################
+#
+# Copyright (c) 2005 Nuxeo and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+
+from zope.component import adapts, getMultiAdapter
+from zope.interface import implements
+
+from cpsskins.browser.rendering.interfaces import IFilter
+from cpsskins.elements.interfaces import IDisplay
+
+class Dispatcher(object):
+    """Editor dispatcher for the layout designer engine
+
+    The element must provide a page named 'editor (layout designer)'
+    """
+    adapts(IDisplay)
+    implements(IFilter)
+
+    def __init__(self, context):
+        self.context = context
+
+    def __call__(self, markup, info):
+        """Apply the editor.
+        """
+        editor = getMultiAdapter((info.element, info.globals.request),
+            name='editor (layout designer)')
+        return editor(markup=markup, info=info)

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/pageblock.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/pageblock.pt
        Sat Oct 29 21:07:19 2005
@@ -0,0 +1,52 @@
+<tal:block
+  define="
+    info options/info;
+    globals info/globals;
+    display info/display;
+    perspective globals/perspective;
+    formats display/formattable:getFormatNames;
+    title context/title;
+    layout nocall:options/layout;
+    this_id view/getId;
+    layout_id layout/identifier;
+    width layout/width">
+
+  <table cellpadding="0" cellspacing="0"
+   class="pageBlockEdit editable shiftable" constraint="vertical"
+   tal:attributes="
+     editable python:1;
+     formattable python: formats and 1 or 0;
+     formats python: ' '.join(formats);
+     folder_editable python:1;
+     width width;
+     id this_id">
+    <tr>
+      <td>
+        <form class="pageBlockEditHeader" grip="1" action="javascript:void(0)">
+          <input class="editable" name="title" type="text" size="15"
+          tal:attributes="value title;
+                          model_id this_id" />
+        </form>
+
+        <form class="sizer" action="javascript:void(0)">
+          <b class="left"></b>
+          <b class="right"></b>
+          <input class="input editable" name="width" type="text" size="4"
+           tal:attributes="value python: width and width or '?';
+                           model_id layout_id;
+                           view_id this_id" />
+        </form>
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <table cellpadding="0" cellspacing="0" width="100%"
+          tal:attributes="editable python:1;
+                          folder_editable python:1;
+                          id this_id">
+          <tr tal:content="structure options/markup" />
+        </table>
+      </td>
+    </tr>
+  </table>
+</tal:block>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/portlet.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/portlet.pt
  Sat Oct 29 21:07:19 2005
@@ -0,0 +1,22 @@
+<div class="editable draggable hover"
+  tal:define="
+    info options/info;
+    globals info/globals;
+    display info/display;
+    perspective globals/perspective;
+    formats display/formattable:getFormatNames;
+    title context/title;
+    id view/getId"
+  tal:attributes="
+    editable python:1;
+    formattable python: formats and 1 or 0;
+    formats python: ' '.join(formats);
+    id id">
+
+    <div class="portletBoxLayoutMode">
+      <strong tal:condition="title" tal:content="title" />
+      (<tal:block i18n:domain="cpsskins"
+        i18n:translate="" content="context/type:contenttype" />)
+    </div>
+
+</div>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/slot.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/slot.pt 
    Sat Oct 29 21:07:19 2005
@@ -0,0 +1,23 @@
+<tal:block define="
+  info options/info;
+  perspective info/perspective;
+  display info/display;
+  formats display/formattable:getFormatNames;
+  slot_title context/title;
+  slot_name context;
+  id view/getId;
+  icon view/getIcon">
+
+  <div class="slotFrame editable draggable"
+   tal:attributes="
+     editable python:1;
+     formattable python: formats and 1 or 0;
+     formats python: ' '.join(formats);
+     id id">
+    <div class="title" tal:content="slot_title|slot_name" />
+    <div class="body"><img src="" tal:attributes="src icon" />
+      <tal:block content="slot_name" />
+    </div>
+  </div>
+
+</tal:block>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/theme.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/theme.pt
    Sat Oct 29 21:07:19 2005
@@ -0,0 +1 @@
+<tal:block content="structure options/markup" />

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/themepage.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/filters/themepage.pt
        Sat Oct 29 21:07:19 2005
@@ -0,0 +1,3 @@
+<div tal:define="id view/getId"
+     tal:attributes="id id"
+     tal:content="structure options/markup" />

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/configure.zcml
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/configure.zcml    
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/configure.zcml    
    Sat Oct 29 21:07:19 2005
@@ -11,6 +11,15 @@
       layer="cpsskins"
   />
 
+  <browser:page
+      name="page-designer.html"
+      class=".Authoring"
+      for="cpsskins.elements.interfaces.IThemePage"
+      template="page_designer.pt"
+      permission="zope.Public"
+      layer="cpsskins"
+  />
+
   <browser:menuItems
       menu="cpsskins_authoring_actions"
       for="*">
@@ -22,6 +31,10 @@
 
   </browser:menuItems>
 
+  <browser:resource
+      name="page_designer.css" file="page_designer.css"
+      layer="cpsskins"
+  />
 
   <engine
       name="page-designer"

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/cell.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/cell.pt   
    Sat Oct 29 21:07:19 2005
@@ -0,0 +1,23 @@
+<td class="editable" style="vertical-align:top"
+  tal:define="
+    info options/info;
+    globals nocall:info/globals;
+    display info/display;
+    perspective globals/perspective;
+    formats display/formattable:getFormatNames;
+    title context/title;
+    id view/getId;
+    layout nocall:options/layout;
+    layout_id layout/identifier;
+    width layout/width"
+  tal:attributes="
+    editable python:1;
+    formattable python: formats and 1 or 0;
+    formats python: ' '.join(formats);
+    id id;
+    width width;">
+
+  <div class="container" focus="1"
+       tal:content="structure options/markup" />
+
+</td>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/dispatcher.py
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/dispatcher.py
 Sat Oct 29 21:07:19 2005
@@ -0,0 +1,42 @@
+##############################################################################
+#
+# Copyright (c) 2005 Nuxeo and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+
+from zope.component import adapts, getMultiAdapter
+from zope.interface import implements
+
+from cpsskins.browser.rendering.interfaces import IFilter
+from cpsskins.elements.interfaces import IDisplay
+
+class Dispatcher(object):
+    """Editor dispatcher for the page designer engine
+
+    The element must provide a page named 'editor (page designer)'
+    """
+    adapts(IDisplay)
+    implements(IFilter)
+
+    def __init__(self, context):
+        self.context = context
+
+    def __call__(self, markup, info):
+        """Apply the editor.
+        """
+        editor = getMultiAdapter((info.element, info.globals.request),
+            name='editor (page designer)')
+        return editor(markup=markup, info=info)

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/pageblock.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/pageblock.pt
  Sat Oct 29 21:07:19 2005
@@ -0,0 +1,18 @@
+<tal:block
+  define="
+    info options/info;
+    globals info/globals;
+    display info/display;
+    perspective globals/perspective;
+    formats display/formattable:getFormatNames;
+    title context/title;
+    layout nocall:options/layout;
+    this_id view/getId;
+    layout_id layout/identifier;
+    width layout/width">
+
+  <table cellpadding="0" cellspacing="0" tal:attributes="width width">
+    <tr tal:content="structure options/markup" />
+  </table>
+
+</tal:block>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/portlet.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/portlet.pt
    Sat Oct 29 21:07:19 2005
@@ -0,0 +1,18 @@
+<div class="editable draggable hover"
+  tal:define="
+    info options/info;
+    globals info/globals;
+    display info/display;
+    perspective globals/perspective;
+    formats display/formattable:getFormatNames;
+    title context/title;
+    id view/getId"
+  tal:attributes="
+    editable python:1;
+    formattable python: formats and 1 or 0;
+    formats python: ' '.join(formats);
+    id id">
+
+    <div tal:content="structure options/markup" />
+
+</div>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/slot.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/slot.pt   
    Sat Oct 29 21:07:19 2005
@@ -0,0 +1,23 @@
+<tal:block define="
+  info options/info;
+  perspective info/perspective;
+  display info/display;
+  formats display/formattable:getFormatNames;
+  slot_title context/title;
+  slot_name context;
+  id view/getId;
+  icon view/getIcon">
+
+  <div class="slotFrame editable draggable"
+   tal:attributes="
+     editable python:1;
+     formattable python: formats and 1 or 0;
+     formats python: ' '.join(formats);
+     id id">
+    <div class="title" tal:content="slot_title|slot_name" />
+    <div class="body"><img src="" tal:attributes="src icon" />
+      <tal:block content="slot_name" />
+    </div>
+  </div>
+
+</tal:block>

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/theme.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/theme.pt  
    Sat Oct 29 21:07:19 2005
@@ -0,0 +1 @@
+<tal:block content="structure options/markup" />

Added: 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/themepage.pt
==============================================================================
--- (empty file)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/filters/themepage.pt
  Sat Oct 29 21:07:19 2005
@@ -0,0 +1,3 @@
+<div tal:define="id view/getId"
+     tal:attributes="id id"
+     tal:content="structure options/markup" />
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to