Author: jmorliaguet
Date: Wed May 31 00:29:30 2006
New Revision: 3279

Modified:
   cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.js
   cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py
   cpsskins/branches/paris-sprint-2006/ui/screens/editor.pt
   
cpsskins/branches/paris-sprint-2006/ui/screens/pagedesigner/wysiwyg/portlet.pt

Log:

- added a hover effect on active areas



Modified: cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.js
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.js  
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/common/authoring.js  Wed May 
31 00:29:30 2006
@@ -88,7 +88,19 @@
   'duplicate element': duplicateElement,
   'delete element': deleteElement,
   'edit element': editElement,
-  'cancel event': function(e) {Event.stop(e); return false;}
+  'cancel event': function(e) {Event.stop(e); return false;},
+  'activate area': function(e) {
+     var target = e.currentTarget;
+     target._before_activate = target.getStyle('background-color');
+     target.setStyle({'background-color': '#ffc'})
+
+  },
+  'deactivate area': function(e) {
+     var target = e.currentTarget;
+     if (target._before_activate) {
+       e.currentTarget.setStyle({'background-color': target._before_activate})
+     }
+  }
 });
 
 /* Register widgets */

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py       
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/definitions.py       Wed May 
31 00:29:30 2006
@@ -343,7 +343,7 @@
         'controllers': ['main-editor-perspectives', 'disable-links',
                         'page-mode-perspectives', 'element-mover',
                         'portlet-factory', 'main-editor-actions',
-                        'menu-actions'],
+                        'menu-actions', 'reveal-areas'],
     },
 
     'layout-mode': {
@@ -628,7 +628,19 @@
         'rules': {
             '#canvasArea a': {
                 'click': 'cancel event',
-            }
-        }
+            },
+        },
+    },
+
+    # reveal active areas
+    'reveal-areas': {
+        'id': 'reveal-areas',
+        'type': 'behaviour',
+        'rules': {
+            'div.editable': {
+                'mouseover': 'activate area',
+                'mouseout': 'deactivate area',
+            },
+        },
     },
 }

Modified: cpsskins/branches/paris-sprint-2006/ui/screens/editor.pt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/editor.pt    (original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/editor.pt    Wed May 31 
00:29:30 2006
@@ -38,6 +38,8 @@
            tal:content="python: controller('main-editor-actions')" />
       <ins class="controller"
            tal:content="python: controller('disable-links')" />
+      <ins class="controller"
+           tal:content="python: controller('reveal-areas')" />
 
       <!-- top tabs -->
       <ins class="model" tal:content="python: model('theme-tabs')" />

Modified: 
cpsskins/branches/paris-sprint-2006/ui/screens/pagedesigner/wysiwyg/portlet.pt
==============================================================================
--- 
cpsskins/branches/paris-sprint-2006/ui/screens/pagedesigner/wysiwyg/portlet.pt  
    (original)
+++ 
cpsskins/branches/paris-sprint-2006/ui/screens/pagedesigner/wysiwyg/portlet.pt  
    Wed May 31 00:29:30 2006
@@ -1,5 +1,5 @@
 <ins class="model" tal:content="context/@@getModel" />
 
-<div class="elementMovable elementShiftable portletTarget"
+<div class="editable elementMovable elementShiftable portletTarget"
   tal:attributes="id context/identifier"
   tal:content="structure options/markup" />
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to