Author: jmorliaguet
Date: Mon Jun  5 12:54:04 2006
New Revision: 3314

Modified:
   cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.css
   cpsskins/branches/paris-sprint-2006/ui/screens/common/images/form-top-bg.png
   
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/l-edit-tab-sel.png
   
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/r-edit-tab-sel.png
   
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element_editor.pt
   cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/views.py

Log:

- cosmetic: selected tabs are shown as selected



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 Mon Jun 
 5 12:54:04 2006
@@ -121,7 +121,7 @@
   text-align: left;
   text-decoration: none;
   font-size: 11px;
-  padding-left: 2px;
+  padding-left: 1px;
   margin: 0;
 }
 
@@ -207,6 +207,7 @@
   border-bottom: 1px dotted #ccc;
   margin-bottom: 15px;
   padding-top: 15px;
+  padding-left: 9px;
   margin-left: 0;
 }
 
@@ -236,7 +237,7 @@
 /* edit form tabs */
 
 .editTabs li {
-  background: #e3e3e3 url(++resource++l-edit-tab.png) top left no-repeat;
+  background: url(++resource++l-edit-tab.png) top left no-repeat;
 }
 
 .editTabs li.selected {

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/form-top-bg.png
==============================================================================
Binary files. No diff available.

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/l-edit-tab-sel.png
==============================================================================
Binary files. No diff available.

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/common/images/r-edit-tab-sel.png
==============================================================================
Binary files. No diff available.

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element_editor.pt
==============================================================================
--- 
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element_editor.pt  
    (original)
+++ 
cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/element_editor.pt  
    Mon Jun  5 12:54:04 2006
@@ -11,6 +11,7 @@
   edited_type edited/type:name;
   format request/form/format|nothing;
   tab request/form/tab|nothing;
+  display_name display/type:name;
   preset_info edited/@@getPresetsInfo">
   <a class="back"
      
href="javascript:CPSSkins.getControllerById('main-editor-perspectives').goBack()">&lt;
 back to the editor</a>
@@ -22,19 +23,21 @@
   <p class="description" tal:content="description"
      tal:define="description element/description|string:No description" />
   <ul class="tabs editTabs">
-    <li>
+    <li tal:attributes="class python: not tab and 'selected' or nothing">
       <a i18n:translate="" tal:content="info/element/name" tal:attributes="
-         href 
string:javascript:CPSSkins.getModelById('element-editor').updateData({form: 
{id: '$id', mode: 'edit'}})" /></li>
-    <li>
+         href 
string:javascript:CPSSkins.getModelById('element-editor').updateData({form: 
{id: '$id', mode: 'edit', tab: ''}})" /></li>
+    <li tal:attributes="class python: tab == display_name and 'selected' or 
nothing">
       <a i18n:translate="" tal:attributes="
-         href 
string:javascript:CPSSkins.getModelById('element-editor').updateData({form: 
{id: $id, tab: '${display/type:name}'}})">Display</a></li>
-    <li tal:repeat="format info/formats">
+         href 
string:javascript:CPSSkins.getModelById('element-editor').updateData({form: 
{id: $id, tab: '$display_name'}})">Display</a></li>
+    <tal:block repeat="format info/formats">
+      <li tal:attributes="class python: format['selected'] and 'selected' or 
nothing">
+        <a i18n:translate="" tal:attributes="
+           href 
string:javascript:CPSSkins.getModelById('element-editor').updateData({form: 
{id: $id, display: $display_id, format: ${format/id}, uri: '${format/uri}', 
tab: '${format/name}'}})"
+           tal:content="format/name" /></li>
+    </tal:block>
+    <li tal:attributes="class python: tab == 'preview' and 'selected' or 
nothing">
       <a i18n:translate="" tal:attributes="
-         href 
string:javascript:CPSSkins.getModelById('element-editor').updateData({form: 
{id: $id, display: $display_id, format: ${format/id}, uri: '${format/uri}', 
tab: '${format/name}'}})"
-       tal:content="format/name" /></li>
-    <li>
-      <a i18n:translate="" tal:attributes="
-         href 
string:javascript:CPSSkins.getModelById('element-editor').updateData({form: 
{id: '$id', mode: 'preview'}})">Preview</a></li>
+         href 
string:javascript:CPSSkins.getModelById('element-editor').updateData({form: 
{id: '$id', mode: 'preview', tab: 'preview'}})">Preview</a></li>
   </ul>
 
   <div class="form">

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/views.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/views.py       
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/elementeditor/views.py       
Mon Jun  5 12:54:04 2006
@@ -117,7 +117,8 @@
                     preset_uri = uri
 
             formats.append({'name': format_name, 'id': f.identifier or 0,
-                            'uri': uri, 'is_preset': is_preset})
+                            'uri': uri, 'is_preset': is_preset,
+                            'selected': selected})
 
         viewer = getMultiAdapter((context, request), IViewer)
         preview = viewer()
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to