details:   /erp/devel/pi/rev/38474a07fa69
changeset: 12147:38474a07fa69
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Thu May 12 22:06:18 2011 +0200
summary:   Fixes issue 17151: MyOB: dragging widgets, widgets can be dropped 
next to but not below/above another

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
 |   4 ++-
 
modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js
                    |  12 ++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diffs (50 lines):

diff -r 74a5c5067d69 -r 38474a07fa69 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
   Thu May 12 22:04:44 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
   Thu May 12 22:06:18 2011 +0200
@@ -1151,7 +1151,9 @@
   // for precision, the textual value is sent to the server
   // which can be transferred to a bigdecimal there
   changed: function (form, item, value) {
-    this.form.setTextualValue(this.name, this.getEnteredValue(), 
this.typeInstance);
+    if (this.form.setTextualValue) {
+      this.form.setTextualValue(this.name, this.getEnteredValue(), 
this.typeInstance);
+    }
     this.Super('changed', arguments);
   },
   
diff -r 74a5c5067d69 -r 38474a07fa69 
modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js
--- 
a/modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js
      Thu May 12 22:04:44 2011 +0200
+++ 
b/modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js
      Thu May 12 22:06:18 2011 +0200
@@ -251,24 +251,28 @@
       // can be set like this using the AutoChild concept of SC
       portalColumnProperties: {
         membersMargin: 12,
+        canAcceptDrop: true,
+        dropTypes: ["Portlet"],
 
         // is used to prevent dropping on the left or right 
         // of a widget
         // the PortalRow is an autochild of PortalColumn, the 
         // rowProperties are used to set properties of PortalRow
-        rowProperties: {
+        portalRowProperties: {
           isHDrop: function(){
             return false;
           }
         },
-
+        
         // after dropping create the widget here
         getDropComponent: function(dragTarget, position){
+          var component;
           if (dragTarget.createWidgetInstance) {
-            dragTarget.createWidgetInstance(this.colNum, position);
+            component = dragTarget.createWidgetInstance(this.colNum, position);
           } else {
-            this.Super('getDropComponent', arguments);
+            component = dragTarget;;
           }
+          this.addPortlet(component, position);
         },
 
         // copied from PortalColumn to set fixed row heights based

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to