details: https://code.openbravo.com/erp/devel/pi/rev/7cb2a5752103
changeset: 20723:7cb2a5752103
user: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date: Thu Jul 11 10:46:28 2013 +0530
summary: Fixes Issue 0024228: When clicking new in Sales Order Grid request
is fired to OrderLine data
When new row is opened for editing, if the grid has selected records, then the
child tabs has to be refreshed.
If no records are selected then the request to child tabs is prevented.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
| 11 ++++++++-
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 389e36c3cc5e -r 7cb2a5752103
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
Wed Jul 10 14:21:58 2013 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
Thu Jul 11 10:46:28 2013 +0530
@@ -1108,7 +1108,8 @@
editRecord: function (record, preventFocus, focusFieldName) {
var rowNum,
// at this point the time fields of the record are formatted in local time
- localTime = true;
+ localTime = true,
+ isRecordSelected = false;
this.messageBar.hide();
if (!this.isShowingForm) {
@@ -1116,8 +1117,14 @@
}
if (!record) { // new case
+ if (this.viewGrid.getSelectedRecords().length !== 0) {
+ //child views have to be refreshed if there are any records selected.
+ isRecordSelected = true;
+ }
this.viewGrid.deselectAllRecords();
- this.refreshChildViews();
+ if (isRecordSelected) {
+ this.refreshChildViews();
+ }
this.viewForm.editNewRecord(preventFocus);
} else {
this.viewGrid.doSelectSingleRecord(record);
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits