Fixes issue 16116: DB Id flashes when editing a grid line with a selector field
authorMartin Taal <martin.taal@openbravo.com>
Thu, 03 Mar 2011 16:28:50 +0100
changeset 10997 eefc39001e3d
parent 10996 56009f6616dd
child 10998 4ce71b93425e
Fixes issue 16116: DB Id flashes when editing a grid line with a selector field
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	Thu Mar 03 16:24:41 2011 +0100
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Thu Mar 03 16:28:50 2011 +0100
@@ -461,6 +461,19 @@
     criteria[OB.Constants.SORTBY_PARAMETER] = this.displayField;
     
     return criteria;
+  },
+  
+  mapValueToDisplay : function (value) {
+    var ret = this.Super('mapValueToDisplay', arguments);
+    if (ret === value && this.isDisabled()) {
+      return '';
+    }
+    if (ret === value && !this.valueMap) {
+      this.valueMap = {};
+      this.valueMap[value] = '';
+      return '';
+    }
+    return ret;
   }
 });