Author: jmorliaguet
Date: Sun Jun 11 12:54:08 2006
New Revision: 3396

Added:
   
cpsskins/branches/paris-sprint-2006/ui/screens/common/add_content_selector.pt   
(contents, props changed)
   cpsskins/branches/paris-sprint-2006/ui/screens/common/images/bg-header.png   
(contents, props changed)
   
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/close-button.png   
(contents, props changed)
Modified:
   cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.css
   cpsskins/branches/paris-sprint-2006/ui/screens/common/configure.zcml
   cpsskins/branches/paris-sprint-2006/ui/screens/common/content_factory.pt
   
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/arrow-down-16.png
   
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/arrow-left-16.png
   cpsskins/branches/paris-sprint-2006/ui/screens/common/images/configure.zcml
   cpsskins/branches/paris-sprint-2006/ui/screens/common/views.py
   cpsskins/branches/paris-sprint-2006/ui/screens/configure.zcml
   cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py
   cpsskins/branches/paris-sprint-2006/ui/screens/editor.pt
   cpsskins/branches/paris-sprint-2006/ui/screens/pagedesigner/page_designer.pt
   cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/site_manager.css

Log:

- UI updates on the toolbox:

  added an "Add a portlet" button to display the toolbox

  added a close button to hide it



Added: 
cpsskins/branches/paris-sprint-2006/ui/screens/common/add_content_selector.pt
==============================================================================
--- (empty file)
+++ 
cpsskins/branches/paris-sprint-2006/ui/screens/common/add_content_selector.pt   
    Sun Jun 11 12:54:08 2006
@@ -0,0 +1,5 @@
+<ul class="inlineButtons" style="float:left">
+  <li>
+    <a 
href="javascript:CPSSkins.getControllerById('panel-perspectives').switchTo('content-factory');">Add
 a portlet</a></li>
+</ul>
+

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.css
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.css 
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.css Sun Jun 
11 12:54:08 2006
@@ -44,37 +44,55 @@
   position: fixed; }
 }
 
-.toolbox {
-  width: 30%;
+.leftPanel {
   vertical-align: top;
   cursor: default;
-  padding-right: 10px;
+}
+
+.toolbox {
+  border: 1px solid #666;
+  margin: 0 5px 0 5px;
 }
 
 .toolbox .header {
-  border-bottom: 1px solid #000;
-  background-color: #999;
-  font-size: 13px;
+  border-bottom: 1px solid #999;
+  background-color: #f0f0f0;
+  background: #f0f0f0 url(++resource++bg-header.png) repeat-x;
   padding: 2px 0px 2px 30px;
-  color: #fff;
+  font: 14px arial;
+}
+
+.toolbox .header .button {
+  float: right;
 }
 
+.toolbox .header .button img {
+  border: none
+}
 .toolbox .section {
-  border-bottom: 1px solid #666;
-  padding: 3px 0px 3px 30px;
+  width: 200px;
+  border-top: 1px solid #fff;
+  border-bottom: 1px solid #999;
+  font: bold 11px arial;
+  padding: 4px 0px 3px 30px;
   display: block;
-  color: #000;
-  background: #ccc url(++resource++arrow-left-16.png) 4px center no-repeat;
+  color: #333;
+  background: #e3e0d8 url(++resource++arrow-left-16.png) 4px center no-repeat;
 }
 
 .toolbox .section.selected {
-  background: #ccc url(++resource++arrow-down-16.png) 4px center no-repeat;
+  background: #e3e0d8 url(++resource++arrow-down-16.png) 4px center no-repeat;
 }
 
 .toolbox div.item {
-  cursor: default;
+  cursor: move;
   padding: 6px;
-  border-bottom: 1px solid #999;
+  border-bottom: 1px dotted #ccc;
+  background-color: #fff;
+}
+
+.toolbox div.item:hover {
+  background-color: #ffc;
 }
 
 .toolbox img.icon {
@@ -88,12 +106,17 @@
 .toolbox .title {
   font-weight: bold;
   font-size: 90%;
+  color: #333;
 }
 
 .toolbox .description {
   font-style: italic
 }
 
+#canvasArea {
+  padding-right: 3px;
+}
+
 /* toolbar buttons */
 .actionPad {
   padding-top: 12px;

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/common/configure.zcml
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/common/configure.zcml        
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/common/configure.zcml        
Sun Jun 11 12:54:08 2006
@@ -16,6 +16,39 @@
 
   <pages
       for="*"
+      class=".views.Editor"
+      layer="cpsskins.browser.skin.cpsskins"
+      permission="zope.ManageContent">
+
+      <page
+          name="editor.html"
+          template="../editor.pt"
+      />
+
+      <page
+          name="getHint"
+          attribute="getHint"
+      />
+
+      <page
+          name="getModel"
+          attribute="getModel"
+      />
+
+      <page
+          name="getView"
+          attribute="getView"
+      />
+
+      <page
+          name="getController"
+          attribute="getController"
+      />
+
+  </pages>
+
+  <pages
+      for="*"
       class=".views.Panels"
       layer="cpsskins.browser.skin.cpsskins"
       permission="zope.ManageContent">
@@ -51,6 +84,11 @@
     />
 
     <page
+      name="add-content-selector.html"
+      template="add_content_selector.pt"
+    />
+
+    <page
       name="content-factory.html"
       template="content_factory.pt"
     />
@@ -81,30 +119,30 @@
       permission="zope.ManageContent"
       class=".views.Editing">
 
-      <page
-          name="getId"
-          attribute="getId"
-      />
+    <page
+        name="getId"
+        attribute="getId"
+    />
 
-      <page
-          name="getPath"
-          attribute="getPath"
-      />
+    <page
+        name="getPath"
+        attribute="getPath"
+    />
 
-      <page
-          name="getParent"
-          attribute="getParent"
-      />
+    <page
+        name="getParent"
+        attribute="getParent"
+    />
 
-      <page
-          name="getIcon"
-          attribute="getIcon"
-      />
+    <page
+        name="getIcon"
+        attribute="getIcon"
+    />
 
-      <page
-          name="getModel"
-          attribute="getModel"
-      />
+    <page
+        name="getModel"
+        attribute="getModel"
+    />
 
   </pages>
 
@@ -237,32 +275,4 @@
 
   </pages>
 
-  <pages
-      layer="cpsskins.browser.skin.cpsskins"
-      for="*"
-      permission="zope.ManageContent"
-      class=".views.JSONViews">
-
-      <page
-          name="getHint"
-          attribute="getHint"
-      />
-
-      <page
-          name="getModel"
-          attribute="getModel"
-      />
-
-      <page
-          name="getView"
-          attribute="getView"
-      />
-
-      <page
-          name="getController"
-          attribute="getController"
-      />
-
-  </pages>
-
 </configure>

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/common/content_factory.pt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/common/content_factory.pt    
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/common/content_factory.pt    
Sun Jun 11 12:54:08 2006
@@ -1,5 +1,8 @@
-<tal:block i18n:domain="cpsskins">
-  <div class="header">Portlets</div>
+<div class="toolbox" i18n:domain="cpsskins">
+  <div class="header">
+    <a class="button" 
href="javascript:CPSSkins.getControllerById('panel-perspectives').hide('content-factory')"><img
 src="++resource++close-button.png" /></a>
+   Portlets
+  </div>
   <tal:block repeat="info view/listPortlets">
     <a i18n:translate=""
      tal:define="provider info/provider; selected info/selected"
@@ -18,4 +21,4 @@
       </div>
     </div>
   </tal:block>
-</tal:block>
+</div>

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/arrow-down-16.png
==============================================================================
Binary files. No diff available.

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/arrow-left-16.png
==============================================================================
Binary files. No diff available.

Added: 
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/bg-header.png
==============================================================================
Binary file. No diff available.

Added: 
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/close-button.png
==============================================================================
Binary file. No diff available.

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/configure.zcml
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/common/images/configure.zcml 
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/common/images/configure.zcml 
Sun Jun 11 12:54:08 2006
@@ -110,4 +110,12 @@
       name="arrow-down-16.png" file="arrow-down-16.png"
       layer="cpsskins.browser.skin.cpsskins" />
 
+  <resource
+      name="close-button.png" file="close-button.png"
+      layer="cpsskins.browser.skin.cpsskins" />
+
+  <resource
+      name="bg-header.png" file="bg-header.png"
+      layer="cpsskins.browser.skin.cpsskins" />
+
 </configure>

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/common/views.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/common/views.py      
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/common/views.py      Sun Jun 
11 12:54:08 2006
@@ -436,12 +436,13 @@
         duplicating = getMultiAdapter((container, request), INodeDuplicating)
         return str(duplicating.duplicate(element))
 
-class JSONViews(object):
-    """JSON views"""
+class Editor(object):
+    """Main editor"""
 
     def __init__(self, context, request):
         self.context = context
         self.request = request
+        self.data = ClientStorage(u'editor')
 
     def getHint(self, msgid):
         return json.write({
@@ -460,3 +461,4 @@
     def getController(self, id):
         return json.write(CONTROLLERS[id])
 
+

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/configure.zcml
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/configure.zcml       
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/configure.zcml       Sun Jun 
11 12:54:08 2006
@@ -2,14 +2,6 @@
     xmlns:browser="http://namespaces.zope.org/browser";
     xmlns="http://namespaces.zope.org/zope";>
 
-  <browser:page
-      for="*"
-      layer="cpsskins.browser.skin.cpsskins"
-      permission="zope.ManageContent"
-      name="editor.html"
-      template="editor.pt"
-  />
-
   <include package=".common" />
 
   <!-- site manager -->

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py       
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py       Sun Jun 
11 12:54:08 2006
@@ -74,6 +74,14 @@
         }
     },
 
+    # buttons for selecting the type of content to add
+    'add-content-selector': {
+        'id': 'add-content-selector',
+        'data': {
+            'url': '@@add-content-selector.html',
+        }
+    },
+
     # the location selection widget at the top of the canvas editing area
     'page-mode-selector': {
         'id': 'page-mode-selector',
@@ -185,7 +193,7 @@
         }
     },
 
-    # the portlet factory at the bottom of the screen
+    # the content factory in the left panel
     'content-factory': {
         'id': 'content-factory',
         'data': {
@@ -199,7 +207,7 @@
             'type': 'local',
         },
         'data': {
-            'provider': 'standard',
+            'provider': '',
         },
     },
 
@@ -454,16 +462,34 @@
         'controllers': ['main-editor-perspectives', 'element-editor-actions'],
     },
 
-    # Bottom area
+    # Left panel
+    'add-content-selector': {
+        'id': 'add-content-selector',
+        'widget': {
+            'type': 'panel',
+        },
+        'model': 'add-content-selector',
+        'perspectives': ['page-designer'],
+        'controllers': ['main-editor-perspectives'],
+    },
+
     'content-factory': {
         'id': 'content-factory',
         'widget': {
             'type': 'panel',
         },
         'model': 'content-factory',
-        'perspectives': ['page-designer', 'content-author'],
+        'perspectives': ['content-factory'],
         'controllers': ['main-editor-perspectives', 'content-factory',
-                        'factory-actions'],
+                        'factory-actions', 'panel-perspectives'],
+        'show_effect': {
+            'transition': 'fadein',
+            'duration': 400,
+        },
+        'hide_effect': {
+            'transition': 'fadeout',
+            'duration': 400,
+        },
     },
 
     # Contextual menu
@@ -552,6 +578,12 @@
         'initial': 'wysiwyg',
     },
 
+    # show / hide panels
+    'panel-perspectives': {
+        'id': 'panel-perspectives',
+        'type': 'perspective selector',
+    },
+
     # tooltip
     'show-hide-tooltip': {
         'id': 'show-hide-tooltip',
@@ -567,7 +599,7 @@
             'offset_x': -5,
             'offset_y': -5,
             'feedback': {
-                'opacity': 1,
+                'opacity': 0.8,
                 'clone': False,
                 'background': '#fc0',
                 'border': '#000',

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/editor.pt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/editor.pt    (original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/editor.pt    Sun Jun 11 
12:54:08 2006
@@ -29,9 +29,11 @@
       <ins class="view" tal:content="python: view('perspective-selector')" />
     </div>
 
+    <ins class="controller"
+         tal:content="python: controller('panel-perspectives')" />
+
     <!-- Edit area for rendered content -->
     <div id="editArea">
-
       <ins class="controller"
            tal:content="python: controller('main-editor-perspectives')" />
       <ins class="controller"
@@ -52,6 +54,9 @@
       <ins class="model" tal:content="python: model('location-selector')" />
       <ins class="view" tal:content="python: view('location-selector')" />
 
+      <ins class="model" tal:content="python: model('add-content-selector')" />
+      <ins class="view" tal:content="python: view('add-content-selector')" />
+
       <ins class="model" tal:content="python: model('page-mode-selector')" />
       <ins class="view" tal:content="python: view('page-mode-selector')" />
       <ins class="controller"
@@ -62,7 +67,7 @@
       <table style="width:100%">
         <tr>
           <!-- left panel -->
-          <td class="toolbox">
+          <td class="leftPanel">
             <ins class="model"
              tal:content="python: model('content-factory')" />
             <ins class="view"
@@ -71,7 +76,7 @@
              tal:content="python: controller('content-factory')" />
           </td>
           <!-- rendered pages -->
-          <td id="canvasArea" valign="top">
+          <td id="canvasArea" style="width: 100%" valign="top">
             <ins class="model" tal:content="python: model('page-designer')" />
             <ins class="view" tal:content="python: view('page-designer')" />
             <ins class="model" tal:content="python: model('content-author')" />

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/pagedesigner/page_designer.pt
==============================================================================
--- 
cpsskins/branches/paris-sprint-2006/ui/screens/pagedesigner/page_designer.pt    
    (original)
+++ 
cpsskins/branches/paris-sprint-2006/ui/screens/pagedesigner/page_designer.pt    
    Sun Jun 11 12:54:08 2006
@@ -1,5 +1,6 @@
 <tal:block define="model nocall:context/@@getModel;
                    view nocall:context/@@getView;">
+
   <ins class="model" tal:content="python: model('layout-mode')" />
   <ins class="view" tal:content="python: view('layout-mode')" />
   <ins class="model" tal:content="python: model('wysiwyg-mode')" />

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/site_manager.css
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/site_manager.css 
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/site_manager.css 
Sun Jun 11 12:54:08 2006
@@ -73,7 +73,7 @@
   width: 100%;
 }
 
-table.panel .header{
+table.panel .header {
   background-color: #eee;
   text-align: left;
   font-size: 90%;
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to