details: https://code.openbravo.com/erp/devel/pi/rev/50df96fb2bfb
changeset: 24215:50df96fb2bfb
user: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date: Wed Aug 06 14:50:41 2014 +0530
summary: Fixes issue 27169: Unexpected behavior in saved views that includes
a filter
Set the record index only if the record is not null.
If not incorrect index is set so the new record was getting lost in the grid
creating the issue.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
| 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r ca197a91d631 -r 50df96fb2bfb
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
Tue Aug 05 14:23:02 2014 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
Wed Aug 06 14:50:41 2014 +0530
@@ -1566,7 +1566,9 @@
// if no recordIndex then select explicitly
if (recordIndex === -1) {
record = view.viewGrid.data.find('id', id);
- recordIndex = view.viewGrid.data.indexOf(record);
+ if (record !== null) {
+ recordIndex = view.viewGrid.data.indexOf(record);
+ }
}
// not in the filter, insert the record in the cachedata so it will be
made visible
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits