details:   https://code.openbravo.com/erp/devel/pi/rev/b71414db01be
changeset: 35698:b71414db01be
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Tue Apr 23 14:43:15 2019 +0200
summary:   Fixes issue 40472: Clicking on text of combo filter selects the 
clicked row

Before this change, when a row was clicked on a combo filter outside its 
checkbox, nothing happened.

Now, to make it consistent with the grid's behaviour, clicking on the text of a 
filter combo item will
result in that particular row being selected.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
 |  12 ++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r cf309c370c14 -r b71414db01be 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
   Tue Apr 23 10:48:04 2019 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
   Tue Apr 23 14:43:15 2019 +0200
@@ -172,6 +172,18 @@
               }
             }
           }
+        },
+        _original_recordClick: isc.PickListMenu.getPrototype().recordClick,
+        recordClick: function (viewer, record, recordNum, field, fieldNum, 
value, rawValue) {
+          if (field && field.name === '_checkboxField') {
+            // when clicking on the checkbox, execute default behaviour
+            return this._original_recordClick(viewer, record, recordNum, 
field, fieldNum, value, rawValue);
+          } else {
+            // when clicking a row outside the checkbox, select that specific 
row and close the popup
+            this.formItem.setValue('==' + record._identifier);
+            this.formItem.grid.performFilter(true, true);
+            this.hide();
+          }
         }
       };
     }


_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to