Author: jmorliaguet
Date: Mon Oct 10 01:47:10 2005
New Revision: 28098

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

- more robust focus / defocus



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 01:47:10 2005
@@ -410,6 +410,7 @@
     drag_element(mo, e);
   }
   mo.onmouseover = function(e) {
+    if (!moved) return;
     set_dragbox_dimensions(mo);
   }
   mo.onmouseup = function(e) {
@@ -469,10 +470,10 @@
   mo.onmouseover = function(e) {
     move_to_container(mo, e);
     pd_stopEvent(e);
-    focus(mo);
+    if (mo.getAttribute("focus")) focus(mo);
   }
   mo.onmouseout = function(e) {
-    defocus(mo);
+    if (mo.getAttribute("focus")) defocus(mo);
   }
   mo.onmouseup = function(e) {
     if (factory) {
@@ -486,10 +487,11 @@
       add_element(mo, el, type_name);
     }
     factory = null;
+    if (mo.getAttribute("focus")) defocus(mo);
   }
-  defocus(mo);
 }
 
+
 function setupEditable(mo) {
   mo.onmousedown = function(e) {
     var target = getEventTarget(e);
@@ -507,7 +509,7 @@
     if (className.indexOf('editable') >= 0 || !moved) {
       return pd_stopEvent(e);
     } else {
-      highlight(mo, '2000');
+      highlight(mo);
       return pd_itemOnContextMenu(mo, e, "choice-context-menu");
     }
   }

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 01:47:10 2005
@@ -39,6 +39,7 @@
                     view_id id" />
   </form>
 
-  <div class="container hover" 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