Author: jmorliaguet
Date: Tue Oct  4 00:37:04 2005
New Revision: 27898

Modified:
   z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/edit_menu.pt
   z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/editing.css
Log:

- simpler and more robust code for the edit panel



Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/edit_menu.pt
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/edit_menu.pt     
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/edit_menu.pt     
Tue Oct  4 00:37:04 2005
@@ -3,16 +3,18 @@
    class="panel" i18n:domain="cpsskins"
    tal:define="tmutil context/@@getThemeManager;
                perspective context/@@getPerspective;
-               format_name request/form/format|nothing;
+               format_name request/form/format|string:;
+               location request/form/location|nothing;
                current_theme python:tmutil.getThemeInContext(context);
                displayable context/displayable:this;
                actual_display python: displayable.getDisplay(perspective);
                display python: displayable.getEffectiveDisplay(perspective);
                formattable display/formattable:this;
-               format python: format_name and 
formattable.getFormat(format_name) or nothing;
-               format_url format/@@absolute_url;
-               main_url python: format_name and format_url or '.'"
-   tal:attributes="onload python: format_name and 'parent.main.location.href = 
\'%s/@@edit.html\'' % main_url
+               edited formattable/?format_name|context;
+               edit_url string:${edited/@@absolute_url}/@@edit.html;
+               main_url request/form/main_url|edit_url"
+   tal:attributes="onload python: main_url and
+                         'parent.main.location.href = \'%s\'' % main_url
                           or 'parent.main.location.reload()'">
 
     <metal:block use-macro="context/@@authoring_macros/perspective_selector" />
@@ -22,8 +24,8 @@
 
       <!-- edit element -->
       <li>
-        <a class="item" href="@@edit.html" target="main" i18n:translate=""
-           onclick="window.location.href = '@@edit-menu.html'">
+        <a class="item" i18n:translate=""
+           href="@@edit-menu.html?main_url=@@edit.html">
           <img src="" tal:attributes="src context/@@getIcon" />
           <tal:block i18n:translate="" content="context/contenttype" />
         </a>
@@ -45,8 +47,8 @@
     <div style="clear:both"></div>
 
     <div class="views">
-      <a href="@@view-editor.html" target="main"
-        onclick="window.location.href = '@@edit-menu.html'" title="View 
editor">
+      <a href="@@edit-menu.html?main_url=@@view-editor.html"
+         title="View editor">
         Manage views
       </a>
     </div>

Modified: z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/editing.css
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/editing.css      
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/editing.css      
Tue Oct  4 00:37:04 2005
@@ -207,8 +207,8 @@
 .views {
   font: 11px Verdana, Arial, Sans-Serif;
   position: absolute;
-  top: 54px;
-  right: 24px;
+  top: 55px;
+  right: 26px;
 }
 
 .views a, .views a:visited {
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to