Author: jmorliaguet
Date: Mon Oct 10 00:51:27 2005
New Revision: 28097

Modified:
   z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/authoring.css
   z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/authoring.js
Log:

- more cross-browser focus / defocus effect



Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/authoring.css
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/authoring.css    
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/authoring.css    
Mon Oct 10 00:51:27 2005
@@ -335,10 +335,6 @@
   height: expression('40px'); /* for IE 'height' is 'min-height' */
 }
 
-.hover:hover {
-  background-color: #ff6;
-}
-
 #drag-feedback-box {
   position: absolute;
   filter: alpha(opacity=75);

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 00:51:27 2005
@@ -18,6 +18,7 @@
 
 function Element(node) {
   this.node = node;
+  this.bg = node.style.background;
   this.container = node.parentNode;
   this.order = getElementOrder(node);
   this.xpos = null;
@@ -133,6 +134,15 @@
   selection_box.style.display = "none";
 }
 
+function focus(node) {
+  node.bg = node.style.background;
+  node.style.backgroundColor = '#f9f6f6';
+}
+
+function defocus(node) {
+  node.style.background = node.bg;
+}
+
 function setCursor(cursor) {
   edit_space.style.cursor = cursor;
 }
@@ -459,6 +469,10 @@
   mo.onmouseover = function(e) {
     move_to_container(mo, e);
     pd_stopEvent(e);
+    focus(mo);
+  }
+  mo.onmouseout = function(e) {
+    defocus(mo);
   }
   mo.onmouseup = function(e) {
     if (factory) {
@@ -473,6 +487,7 @@
     }
     factory = null;
   }
+  defocus(mo);
 }
 
 function setupEditable(mo) {
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to