details:   https://code.openbravo.com/erp/devel/pi/rev/cb78bd15d4fc
changeset: 14795:cb78bd15d4fc
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Mon Dec 05 15:49:25 2011 +0100
summary:   Fixes issue 19246: Combo boxes in selectors are not working well 
under some circumstances

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js
 |   4 +-
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
              |   4 +-
 
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
       |  11 ++++++++++
 
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
   |   8 +++++++
 4 files changed, 23 insertions(+), 4 deletions(-)

diffs (68 lines):

diff -r 65882216c761 -r cb78bd15d4fc 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js
        Fri Dec 02 08:10:45 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js
        Mon Dec 05 15:49:25 2011 +0100
@@ -50,8 +50,8 @@
     // when the form gets redrawn the the focus may not be in
     // the item but it is still the item which gets the focus
     // after redrawing
-    if (this.form && this.form.redrawing && this.form.getFocusItem() === this) 
{
-      return true;
+    if (this.form && this.form._isRedrawing && this.form.getFocusItem() === 
this) {
+      return;
     }
     
     this.Super('hidePickListOnBlur', arguments);
diff -r 65882216c761 -r cb78bd15d4fc 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
     Fri Dec 02 08:10:45 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
     Mon Dec 05 15:49:25 2011 +0100
@@ -1647,9 +1647,9 @@
   },
   
   redraw: function() {
-    this.redrawing = true;
+    this._isRedrawing = true;
     this.Super('redraw', arguments);
-    delete this.redrawing;
+    delete this._isRedrawing;
     this.selectOnFocus = this.previousSelectOnFocus;
     delete this.previousSelectOnFocus;
   },
diff -r 65882216c761 -r cb78bd15d4fc 
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
--- 
a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
      Fri Dec 02 08:10:45 2011 +0100
+++ 
b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
      Mon Dec 05 15:49:25 2011 +0100
@@ -326,6 +326,17 @@
     }
   },
 
+  hidePickListOnBlur: function() {    
+    // when the form gets redrawn the focus may not be in
+    // the item but it is still the item which gets the focus
+    // after redrawing
+    if (this.form && this.form._isRedrawing && this.form.getFocusItem() === 
this) {
+      return;
+    }
+    
+    this.Super('hidePickListOnBlur', arguments);
+  },
+
   setUpPickList: function (show, queueFetches, request) {
     // Set the pickListWidth just before being shown.
     this.setPickListWidth();
diff -r 65882216c761 -r cb78bd15d4fc 
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
--- 
a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
  Fri Dec 02 08:10:45 2011 +0100
+++ 
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
  Mon Dec 05 15:49:25 2011 +0100
@@ -396,6 +396,14 @@
     this._original_init();
   },
   
+  _handleEditorExit: isc.FormItem.getPrototype().handleEditorExit,
+  handleEditorExit: function() {
+    if (this.form && this.form._isRedrawing) {
+      return;
+    }
+    return this._handleEditorExit();
+  },
+  
   // make sure that the datasources are also destroyed
   _original_destroy: isc.FormItem.getPrototype().destroy,
   destroy: function() {

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to