Author: jmorliaguet
Date: Sun Oct 30 20:37:59 2005
New Revision: 28831

Modified:
   z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.js
   
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/content_author.pt
   
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/layout_designer.pt
   
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/page_designer.pt
Log:

- elements are now rendered in Ajax in the current engine.



Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.js
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.js     
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.js     
Sun Oct 30 20:37:59 2005
@@ -16,6 +16,13 @@
   return e.pageY ? e.pageY : e.clientY;
 }
 
+function getEngineName() {
+  var engine = '';
+  var engine_tag = document.getElementById('engine');
+  if (engine_tag) engine = engine_tag.getAttribute('name');
+  return engine;
+}
+
 function Element(node) {
   this.node = node;
   this.bg = node.style.background;
@@ -87,7 +94,7 @@
 
 /* VIEWS */
 function render_element(id) {
-  var rendered = themeEditor.renderElement(id=id);
+  var rendered = themeEditor.renderElement(id=id, engine=getEngineName());
   var tag = getFirstTag(rendered);
   var wrapper = document.createElement(tag);
   replaceHTML(wrapper, rendered);

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/content_author.pt
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/content_author.pt
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/contentauthor/content_author.pt
    Sun Oct 30 20:37:59 2005
@@ -24,8 +24,6 @@
   </head>
   <body>
 
-    <div id="engine" tal:attributes="name engine" />
-
     <div class="floatingHeader">
       <metal:block use-macro="context/@@authoring_macros/navigation_pad" />
       <metal:block use-macro="context/@@authoring_macros/perspective_selector" 
/>
@@ -37,9 +35,12 @@
     <div id="editSpace">
       <metal:block use-macro="context/@@authoring_macros/themetabs" />
       <metal:block use-macro="context/@@authoring_macros/pagetabs" />
-      <tal:block content="structure python: view.draw(location=context)"/>
+      <tal:block content="structure python: view.draw(
+                          location=context, engine=engine)"/>
     </div>
 
+    <div id="engine" tal:attributes="name engine" />
+
     <metal:block use-macro="context/@@authoring_macros/authoring_footer" />
 
   </body>

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/layout_designer.pt
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/layout_designer.pt
  (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/layoutdesigner/layout_designer.pt
  Sun Oct 30 20:37:59 2005
@@ -24,8 +24,6 @@
   </head>
   <body>
 
-    <div id="engine" tal:attributes="name engine" />
-
     <div class="floatingHeader">
       <div id="message-box"></div>
       <metal:block use-macro="context/@@authoring_macros/perspective_selector" 
/>
@@ -41,6 +39,8 @@
       <tal:block content="structure python: view.draw(engine=engine)" />
     </div>
 
+    <div id="engine" tal:attributes="name engine" />
+
     <metal:block use-macro="context/@@authoring_macros/authoring_footer" />
   </body>
 </html>

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/page_designer.pt
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/page_designer.pt  
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/engines/pagedesigner/page_designer.pt  
    Sun Oct 30 20:37:59 2005
@@ -24,8 +24,6 @@
   </head>
   <body>
 
-    <div id="engine" tal:attributes="name engine" />
-
     <div class="floatingHeader">
       <div id="message-box"></div>
       <metal:block use-macro="context/@@authoring_macros/perspective_selector" 
/>
@@ -41,6 +39,8 @@
       <tal:block content="structure python: view.draw(engine=engine)" />
     </div>
 
+    <div id="engine" tal:attributes="name engine" />
+
     <metal:block use-macro="context/@@authoring_macros/authoring_footer" />
   </body>
 </html>
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to