Author: jmorliaguet
Date: Mon Oct 10 02:05:35 2005
New Revision: 28099

Modified:
   z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/authoring.js
   
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/cell_edit_layout.pt
Log:

- only empty nodes can get a focus



Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/authoring.js
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/authoring.js     
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/authoring.js     
Mon Oct 10 02:05:35 2005
@@ -135,11 +135,14 @@
 }
 
 function focus(node) {
+  if (!node.getAttribute("focus")) return;
+  if (node.innerHTML) return;
   node.bg = node.style.background;
   node.style.backgroundColor = '#f9f6f6';
 }
 
 function defocus(node) {
+  if (!node.getAttribute("focus")) return;
   node.style.background = node.bg;
 }
 
@@ -470,10 +473,10 @@
   mo.onmouseover = function(e) {
     move_to_container(mo, e);
     pd_stopEvent(e);
-    if (mo.getAttribute("focus")) focus(mo);
+    focus(mo);
   }
   mo.onmouseout = function(e) {
-    if (mo.getAttribute("focus")) defocus(mo);
+    defocus(mo);
   }
   mo.onmouseup = function(e) {
     if (factory) {
@@ -487,7 +490,7 @@
       add_element(mo, el, type_name);
     }
     factory = null;
-    if (mo.getAttribute("focus")) defocus(mo);
+    defocus(mo);
   }
 }
 

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/cell_edit_layout.pt
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/cell_edit_layout.pt
      (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/cell_edit_layout.pt
      Mon Oct 10 02:05:35 2005
@@ -39,7 +39,7 @@
                     view_id id" />
   </form>
 
-  <div class="container" focus="1" tal:content="structure rendered" />
-
+  <div class="container" focus="1"
+       tal:content="structure rendered" />
 
 </td>
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to