Author: jmorliaguet
Date: Sat Mar 25 22:53:25 2006
New Revision: 2729

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

- drag-and-drop is done with a left-click / contextual menus are done with
  a right-click



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      Sat Mar 
25 22:53:25 2006
@@ -411,7 +411,7 @@
         'dragging': {
             'sources': ['.elementMovable'],
             'feedback': {
-                'opacity': 0.8,
+                'opacity': 0.3,
             },
             'zoomback': {
                 'duration': 300,

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 Sat Mar 25 
22:53:25 2006
@@ -732,7 +732,9 @@
 
     sources.each(function(d) {
       $$(d).each(function(el) {
-        if (el.childOf(widget)) el[draggable_token] = true;
+        if (el.childOf(widget)) {
+          el[draggable_token] = true;
+        };
       });
     });
 
@@ -790,6 +792,7 @@
   },
 
   dragEvent: function(e) {
+    if (!Event.isLeftClick(e)) return false;
     var draggable = $(this._findDraggable(e));
     if (!draggable) {
       return false;
@@ -860,7 +863,6 @@
         });
       }
     }
-    Event.stop(e);
   },
 
   moveEvent: function(e) {
@@ -2090,8 +2092,9 @@
     Event.observe(document, "mousedown", this.hideEvent);
 
     $A(this.def.selectors || []).each(function(s) {
-      $$(s).each(function(e) {
-        Event.observe(e, "mouseup", showEvent);
+      $$(s).each(function(el) {
+        Event.observe(el, "mouseup", showEvent);
+        el.oncontextmenu = function(e) { return false };
       });
     });
   },
@@ -2260,6 +2263,7 @@
 
   /* Event handlers */
   showEvent: function(e) {
+    if (Event.isLeftClick(e)) return;
     var element = Event.element(e);
     var selected = CPSSkins.Identifiable.getIdentifiable(element);
     if (!selected) return;
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to