Author: jmorliaguet
Date: Tue Apr 11 11:46:39 2006
New Revision: 2811

Modified:
   cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py
   cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
Log:

- reverted and fixed drag-and-drop issue by not defining drag-and-drop areas
  implicitly.



Modified: cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py      
(original)
+++ cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py      Tue Apr 
11 11:46:39 2006
@@ -135,15 +135,6 @@
 
 VIEWS = {
 
-    'screen': {
-        'id': 'screen',
-        'widget': {
-            'area': 'screen',
-        },
-        'perspectives': ['page-designer', 'layout-designer', 'content-author'],
-        'controllers': ['main-editor-perspectives', 'portlet-factory'],
-    },
-
     # Top area
     'action-pad': {
         'id': 'action-pad',
@@ -227,7 +218,7 @@
         'model': 'page-designer',
         'perspectives': ['page-designer'],
         'controllers': ['main-editor-perspectives', 'theme-switcher',
-                        'element-mover'],
+                        'element-mover', 'portlet-factory'],
     },
 
     'layout-designer': {
@@ -238,7 +229,7 @@
         'model': 'layout-designer',
         'perspectives': ['layout-designer'],
         'controllers': ['main-editor-perspectives', 'theme-switcher',
-                        'element-mover'],
+                        'element-mover', 'portlet-factory'],
     },
 
     'interaction-designer': {
@@ -258,7 +249,8 @@
         },
         'model': 'content-author',
         'perspectives': ['content-author'],
-        'controllers': ['main-editor-perspectives', 'element-mover'],
+        'controllers': ['main-editor-perspectives', 'element-mover', 
+                        'portlet-factory'],
     },
 
     # screen
@@ -330,7 +322,7 @@
         },
         'model': 'portlet-factory',
         'perspectives': ['page-designer', 'layout-designer', 'content-author'],
-        'controllers': ['main-editor-perspectives'],
+        'controllers': ['main-editor-perspectives', 'portlet-factory'],
     },
 
     # Contextual menu

Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original)
+++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Tue Apr 11 
11:46:39 2006
@@ -711,16 +711,18 @@
     if (shifting) {
       if (shifting.element) {
         this._shiftablezones = document.getElementsByClassName(
-                               shifting.element, widget)
+                               shifting.element)
       }
       if (shifting.container) {
         this._containerzones = document.getElementsByClassName(
-                               shifting.container, widget)
+                               shifting.container)
       }
     }
     if (this.def.dropping) {
-      this._dropzones = document.getElementsByClassName(
-                        this.def.dropping.target, widget)
+      if (this.def.dropping.target) {
+        this._dropzones = document.getElementsByClassName(
+                          this.def.dropping.target)
+      }
     }
 
     var dragEvent = this.dragEvent.bindAsEventListener(
@@ -908,7 +910,7 @@
     var y = Event.pointerY(e);
 
     var inTarget = false;
-    var dropzones = this._dropzones;
+    var dropzones = this._dropzones || [];
     if (this.def.dropping) {
       dropzones.each(function(d) {
         if (Position.within(d, x, y)) {
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to