Author: jmorliaguet
Date: Mon Mar  6 10:38:02 2006
New Revision: 2544

Added:
   cpsskins/branches/jmo-perspectives/ui/panels/settings_section.pt   
(contents, props changed)
Modified:
   cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py
   cpsskins/branches/jmo-perspectives/ui/authoring/views.py
   cpsskins/branches/jmo-perspectives/ui/panels/action_pad.pt
   cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml
   cpsskins/branches/jmo-perspectives/ui/panels/settings.pt
   cpsskins/branches/jmo-perspectives/ui/screens/editor.pt
Log:

- added new panel for managing settings (not ajaxified yet)

- fixed the tooltip (added missing controller)



Modified: cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py      
(original)
+++ cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py      Mon Mar 
 6 10:38:02 2006
@@ -123,6 +123,7 @@
             'transition': 'fadein',
             'delay': 2000,
         },
+        'controllers': ['show-hide-tooltip'],
     },
 
     'perspective-selector': {
@@ -320,9 +321,15 @@
     'main-editor-perspectives': {
         'id': 'main-editor-perspectives',
         'type': 'perspective selector',
+        'initial': 'site-designer',
     },
     'site-designer-perspectives': {
         'id': 'site-designer-perspectives',
         'type': 'perspective selector',
+        'initial': 'settings',
+    },
+    'show-hide-tooltip': {
+        'id': 'show-hide-tooltip',
+        'type': 'focus observer',
     },
 }

Modified: cpsskins/branches/jmo-perspectives/ui/authoring/views.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/authoring/views.py    (original)
+++ cpsskins/branches/jmo-perspectives/ui/authoring/views.py    Mon Mar  6 
10:38:02 2006
@@ -234,7 +234,7 @@
             'id': msgid,
             'data': {
                 'hint': _(msgid)
-            }
+            },
         })
 
     def getModel(self, id):

Modified: cpsskins/branches/jmo-perspectives/ui/panels/action_pad.pt
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/panels/action_pad.pt  (original)
+++ cpsskins/branches/jmo-perspectives/ui/panels/action_pad.pt  Mon Mar  6 
10:38:02 2006
@@ -18,5 +18,6 @@
 
   <!-- tooltip -->
   <ins class="view" cite="@@getView?id=tooltip"></ins>
+  <ins class="controller" cite="@@getController?id=show-hide-tooltip"></ins>
 
 </div>

Modified: cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml (original)
+++ cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml Mon Mar  6 
10:38:02 2006
@@ -45,6 +45,11 @@
     />
 
     <page
+      name="settings-section.html"
+      template="settings_section.pt"
+    />
+
+    <page
       name="associations.html"
       template="associations.pt"
     />
@@ -69,4 +74,9 @@
 
   </pages>
 
+  <resource
+      name="cpsskins-logo.png" file="cpsskins_logo.png"
+      layer="cpsskins.browser.skin.cpsskins"
+  />
+
 </configure>

Modified: cpsskins/branches/jmo-perspectives/ui/panels/settings.pt
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/panels/settings.pt    (original)
+++ cpsskins/branches/jmo-perspectives/ui/panels/settings.pt    Mon Mar  6 
10:38:02 2006
@@ -1,54 +1,35 @@
-<tal:block define="engine string:site-designer;
-                   selection context/@@getSelection;
-                   section selection/section|nothing;
-                   subsection selection/subsection|nothing;
-                   selected selection/selected|nothing">
-
-  <table class="panel" cellpadding="0" cellspacing="0"
-         tal:define="info context/@@getSettingInfo">
-    <tr>
-      <td class="first">
-        <div class="sections">
-          <img class="icon"
-               src="/++skin++cpsskins/@@/++resource++settings-48.png" />
-          <ul>
-            <li tal:repeat="subsection info">
-              <a class="section"
-                 tal:attributes="href 
string:javascript:CPSSkins.getControllerById('setting-perspectives').switchTo('$subsection')"
-                 tal:content="subsection" i18n:translate="" />
-            </li>
-          </ul>
-          <br style="clear:both"/>
-        </div>
-      </td>
-      <td class="subsection" tal:condition="subsection">
-
-        <h2 tal:content="subsection" i18n:translate="" />
-        <div class="sections">
-
-        <ul tal:define="setting_info info">
-          <li tal:repeat="info setting_info/?subsection|nothing">
-            <tal:block content="info/setting/title" />
-            <tal:block define="name info/name;
-                               readonly info/readonly;
-                               custom info/custom">
-              <a tal:attributes="href string:@@customizeSetting?name=$name"
-                 tal:condition="readonly">[customize]</a>
-              <a tal:attributes="href string:@@removeSetting?name=$name"
-                 tal:condition="python: not custom and not 
readonly">[remove]</a>
-              <a tal:attributes="href string:@@decustomizeSetting?name=$name"
-                 tal:condition="custom">[remove customization]</a>
-              <a tal:attributes="href string:@@exportSetting?name=$name"
-                 tal:condition="not:readonly">[export]</a>
-              <a tal:attributes="href string:@@reloadSetting?name=$name"
-                 tal:condition="readonly">[reload]</a>
-            </tal:block>
+<table class="panel" cellpadding="0" cellspacing="0"
+       tal:define="info context/@@getSettingInfo">
+  <tr>
+    <td class="first">
+      <div class="sections">
+        <img class="icon"
+             src="/++skin++cpsskins/@@/++resource++settings-48.png" />
+        <ul>
+          <li tal:repeat="section info">
+            <a class="section"
+               tal:attributes="href 
string:javascript:CPSSkins.getModelById('settings-section').setData({'url': 
'@@settings-section.html?section=$section'})"
+               tal:content="section" i18n:translate="" />
           </li>
         </ul>
-        </div>
+        <br style="clear:both"/>
+      </div>
+    </td>
+    <td class="subsection">
+
+      <ins class="model">
+      {"id": "settings-section"}
+      </ins>
 
-      </td>
-    </tr>
-  </table>
+      <ins class="view">
+      {"id": "settings-section",
+       "widget": {
+         "template": "@@settings-section.html?section=perspective"
+       },
+       "model": "settings-section"
+      }
+      </ins>
 
-</tal:block>
+    </td>
+  </tr>
+</table>

Added: cpsskins/branches/jmo-perspectives/ui/panels/settings_section.pt
==============================================================================
--- (empty file)
+++ cpsskins/branches/jmo-perspectives/ui/panels/settings_section.pt    Mon Mar 
 6 10:38:02 2006
@@ -0,0 +1,23 @@
+<tal:block define="subsection string:perspective">
+  <div class="sections">
+    <ul tal:define="setting_info context/@@getSettingInfo">
+      <li tal:repeat="info setting_info/?subsection|nothing">
+        <tal:block content="info/setting/title" />
+        <tal:block define="name info/name;
+                           readonly info/readonly;
+                           custom info/custom">
+          <a tal:attributes="href string:@@customizeSetting?name=$name"
+             tal:condition="readonly">[customize]</a>
+          <a tal:attributes="href string:@@removeSetting?name=$name"
+             tal:condition="python: not custom and not readonly">[remove]</a>
+          <a tal:attributes="href string:@@decustomizeSetting?name=$name"
+             tal:condition="custom">[remove customization]</a>
+          <a tal:attributes="href string:@@exportSetting?name=$name"
+             tal:condition="not:readonly">[export]</a>
+          <a tal:attributes="href string:@@reloadSetting?name=$name"
+             tal:condition="readonly">[reload]</a>
+        </tal:block>
+      </li>
+    </ul>
+  </div>
+</tal:block>

Modified: cpsskins/branches/jmo-perspectives/ui/screens/editor.pt
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/screens/editor.pt     (original)
+++ cpsskins/branches/jmo-perspectives/ui/screens/editor.pt     Mon Mar  6 
10:38:02 2006
@@ -23,12 +23,10 @@
   </head>
   <body>
     <div class="floatingHeader">
-
       <ins class="model" cite="@@getModel?id=action-pad"></ins>
       <ins class="view" cite="@@getView?id=action-pad"></ins>
       <ins class="model" cite="@@getModel?id=perspective-selector"></ins>
       <ins class="view" cite="@@getView?id=perspective-selector"></ins>
-  <a href="#" onclick="javascript: 
CPSSkins.getControllerById('main-editor-perspectives').switchTo('content-author')">Content
 author</a> 
     </div>
 
     <!-- Edit area for rendered content -->
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to