Author: jmorliaguet
Date: Mon Oct  3 22:38:32 2005
New Revision: 27895

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

- fixed all redirection problems in the edit panels.



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     
Mon Oct  3 22:38:32 2005
@@ -12,22 +12,18 @@
                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 string:parent.main.location.href = 
'$main_url/@@edit.html'">
+   tal:attributes="onload python: format_name and 'parent.main.location.href = 
\'%s/@@edit.html\'' % main_url
+                          or 'parent.main.location.reload()'">
 
     <metal:block use-macro="context/@@authoring_macros/perspective_selector" />
 
-    <!-- add a view -->
-    <tal:block condition="python: 'add_view' in request.form">
-      <tal:block define="viewable context/viewable:this;
-                 create python: viewable.addView(perspective)" />
-    </tal:block>
-
     <!-- top menu -->
     <ul class="buttons">
 
       <!-- edit element -->
       <li>
-        <a class="item" href="@@edit.html" target="main" i18n:translate="">
+        <a class="item" href="@@edit.html" target="main" i18n:translate=""
+           onclick="window.location.href = '@@edit-menu.html'">
           <img src="" tal:attributes="src context/@@getIcon" />
           <tal:block i18n:translate="" content="context/contenttype" />
         </a>
@@ -38,8 +34,8 @@
         <li tal:define="formats formattable/getFormats"
             tal:condition="formats"
             tal:repeat="format formats">
-          <a target="main" class="item format" i18n:translate=""
-             tal:attributes="href string:${format/@@absolute_url}/@@edit.html"
+          <a class="item format" i18n:translate=""
+             tal:attributes="href 
string:./edit-menu.html?format=${format/formatname}"
              tal:content="format/contenttype" />
         </li>
       </tal:block>
@@ -49,7 +45,8 @@
     <div style="clear:both"></div>
 
     <div class="views">
-      <a href="@@view-editor.html" title="View editor" target="main">
+      <a href="@@view-editor.html" target="main"
+        onclick="window.location.href = '@@edit-menu.html'" title="View 
editor">
         Manage views
       </a>
     </div>
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to