details:   https://code.openbravo.com/erp/devel/pi/rev/c1967f90a2b6
changeset: 15387:c1967f90a2b6
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Thu Feb 09 11:50:48 2012 +0100
summary:   Fixes issue 19702: Form Item not disabled when calling FIC

details:   https://code.openbravo.com/erp/devel/pi/rev/cc8d0c0aab83
changeset: 15388:cc8d0c0aab83
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Thu Feb 09 11:52:20 2012 +0100
summary:   Fixes issue 19248: Focus does not move to next field when selecting 
a value in a combo box
Use correct blur method to prevent current item from getting refocused instead 
of next item

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
            |  14 ++++++++-
 
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
 |   3 +-
 2 files changed, 14 insertions(+), 3 deletions(-)

diffs (48 lines):

diff -r fd8744a6c385 -r cc8d0c0aab83 
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
     Thu Feb 09 11:36:33 2012 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
     Thu Feb 09 11:52:20 2012 +0100
@@ -200,6 +200,15 @@
     
     delete this.validateAfterFicReturn;
     
+    // will be recomputed after the initial values
+    // FIC call, prevents firefox from incorrectly
+    // showing focused style in multiple fields
+    if (this.getFocusItem()) {
+      this.getFocusItem().hasFocus = false;
+      this.getFocusItem().elementBlur();
+    }
+    this.setFocusItem(null);
+    
     // sometimes if an error occured we stay disabled
     // prevent this
     this.setDisabled(false);
@@ -839,8 +848,9 @@
     if (previousAllItemsDisabled !== this.allItemsDisabled) {
       if (this.getFocusItem()) {
         if (this.allItemsDisabled) {
-          if (this.getFocusItem() && !this.initializing) {
-            this.getFocusItem().blurItem();
+          if (!this.initializing) {
+            this.getFocusItem().hasFocus = false;
+            this.getFocusItem().elementBlur();
           }
           this.setHandleDisabled(state);
           this.view.viewGrid.refreshEditRow();
diff -r fd8744a6c385 -r cc8d0c0aab83 
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
  Thu Feb 09 11:36:33 2012 +0100
+++ 
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
  Thu Feb 09 11:52:20 2012 +0100
@@ -517,11 +517,12 @@
   
   // prevent a jscript error in ie when closing a tab
   // https://issues.openbravo.com/view.php?id=18890
+  _doBlurItem: isc.FormItem.getPrototype().blurItem,
   blurItem: function() {
     if (!this.form || this.form.destroyed || this.form._isRedrawing) {
       return;
     }
-    this.Super('blurItem', arguments);
+   this._doBlurItem();
   },
 
   isDisabled: function(ignoreTemporaryDisabled){

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to