details: https://code.openbravo.com/erp/devel/pi/rev/b72329997994
changeset: 22862:b72329997994
user: Augusto Mauch <augusto.mauch <at> openbravo.com>
date: Thu Apr 10 18:41:31 2014 +0200
summary: Related to issue 26231: getParentRecord returns the proper record
The getParentRecord was returning the record selected in the standard grid view
of the parent tab, even if it was showing the tree view grid. This resulted in
that if the subtab had only one record, the tab display logic was not working
properly.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
| 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 2107a74db26b -r b72329997994
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
Thu Apr 10 18:30:33 2014 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
Thu Apr 10 18:41:31 2014 +0200
@@ -1527,6 +1527,7 @@
},
getParentRecord: function () {
+ var grid = null;
if (!this.parentView || !this.parentView.viewGrid.getSelectedRecords() ||
this.parentView.viewGrid.getSelectedRecords().length !== 1) {
return null;
}
@@ -1535,8 +1536,12 @@
if (this.parentView.viewGrid.getSelectedRecord()._new) {
return null;
}
-
- return this.parentView.viewGrid.getSelectedRecord();
+ if (this.isShowingTree) {
+ grid = this.parentView.treeGrid;
+ } else {
+ grid = this.parentView.viewGrid;
+ }
+ return grid.getSelectedRecord();
},
updateTabTitle: function () {
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits