details:   https://code.openbravo.com/erp/devel/pi/rev/a71fb71039f9
changeset: 24712:a71fb71039f9
user:      Inigo Sanchez <inigo.sanchez <at> openbravo.com>
date:      Mon Sep 29 12:34:50 2014 +0200
summary:   related to 27544: fixed problem in dropdown selector in viewForm.

To fix this, it has been considered viewForm and viewGrid.

diffstat:

 
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
 |  16 +++++----
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (28 lines):

diff -r be04770c9306 -r a71fb71039f9 
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
      Mon Sep 29 11:25:36 2014 +0200
+++ 
b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
      Mon Sep 29 12:34:50 2014 +0200
@@ -602,15 +602,17 @@
     fieldWidth = (fieldWidth < 150 ? 150 : fieldWidth);
     // Dropdown selector that shows more than one column.
     if (this.pickListFields.length > 1) {
-      // calculate width of checkBox and first fields before selector field
-      while (i < this.grid.fields.size() && 
nameField.localeCompare(this.grid.fields.get(i).valueField) !== 0) {
-        leftFieldsWidth = leftFieldsWidth + this.grid.fields.get(i).width;
-        i++;
+      // calculate width of checkBox and first fields before selector field in 
viewGrid
+      if (!this.form.view.isShowingForm) {
+        while (i < this.grid.fields.size() && 
nameField.localeCompare(this.grid.fields.get(i).valueField) !== 0) {
+          leftFieldsWidth = leftFieldsWidth + this.grid.fields.get(i).width;
+          i++;
+        }
+        // prevents a pickListWidth longer than width of the grid.
+        extraWidth = Math.min(150 * (this.pickListFields.length - 1), 
this.grid.width - fieldWidth - this.grid.scrollbarSize - leftFieldsWidth);
       }
-      // prevents a pickListWidth longer than width of the grid.
-      extraWidth = Math.min(150 * (this.pickListFields.length - 1), 
this.grid.width - fieldWidth - leftFieldsWidth);
     }
-    this.pickListWidth = fieldWidth + extraWidth - this.grid.scrollbarSize;
+    this.pickListWidth = fieldWidth + extraWidth;
   },
 
   enableShortcuts: function () {

------------------------------------------------------------------------------
Slashdot TV.  Videos for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to