details: https://code.openbravo.com/erp/devel/pi/rev/7b49d037a0cf
changeset: 18158:7b49d037a0cf
user: Augusto Mauch <augusto.mauch <at> openbravo.com>
date: Mon Oct 08 15:52:10 2012 +0200
summary: Fixes issue 21741:P&E is not retrieving the selected record ID
Now, after returning from a P&E process, the focus goes to the tab owner of the
process, following the same behavior as the non P&E processes.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
| 23 ++++++++-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
| 4 +-
2 files changed, 23 insertions(+), 4 deletions(-)
diffs (69 lines):
diff -r 3c81c6408c19 -r 7b49d037a0cf
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
Mon Oct 08 14:38:03 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
Mon Oct 08 15:52:10 2012 +0200
@@ -235,7 +235,7 @@
len = parts.length,
className = '_',
tabSet = OB.MainView.TabSet,
- vStack, manualJS, originalClassName, processClass;
+ vStack, manualJS, originalClassName, processClass, processOwnerView;
if (params.uiPattern === 'M') { // Manual UI Pattern
try {
@@ -260,9 +260,12 @@
processClass = isc[className] || isc[originalClassName];
if (processClass) {
- this.selectedState = this.activeView && this.activeView.viewGrid &&
this.activeView.viewGrid.getSelectedState();
+ processOwnerView = this.getProcessOwnerView(params.processId);
+ this.selectedState = processOwnerView.viewGrid &&
processOwnerView.viewGrid.getSelectedState();
this.runningProcess = processClass.create(isc.addProperties({},
params, {
- parentWindow: this
+ parentWindow: this,
+ sourceView: this.activeView,
+ buttonOwnerView: processOwnerView
}));
this.openPopupInTab(this.runningProcess, params.windowTitle,
(this.runningProcess.popupWidth ? this.runningProcess.popupWidth : '90%'),
(this.runningProcess.popupHeight ? this.runningProcess.popupHeight : '90%'),
(this.runningProcess.showMinimizeButton ?
this.runningProcess.showMinimizeButton : false),
(this.runningProcess.showMaximizeButton ?
this.runningProcess.showMaximizeButton : false), true, true);
@@ -1081,5 +1084,19 @@
}
this.viewState = result;
OB.PropertyStore.set('OBUIAPP_GridConfiguration', result, this.windowId);
+ },
+
+ getProcessOwnerView: function (processId) {
+ var ownerView, i, j, nActionButtons, nViews = this.views.length;
+ for (i = 0; i < nViews; i++) {
+ nActionButtons = this.views[i].actionToolbarButtons.length;
+ for (j = 0; j < nActionButtons; j++) {
+ if (processId === this.views[i].actionToolbarButtons[j].processId) {
+ return this.views[i];
+ }
+ }
+ }
+ // If it is not found, return the header view
+ return this.view;
}
});
\ No newline at end of file
diff -r 3c81c6408c19 -r 7b49d037a0cf
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
Mon Oct 08 14:38:03 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
Mon Oct 08 15:52:10 2012 +0200
@@ -202,6 +202,8 @@
window.view.messageBar.setMessage(message.severity, message.text);
}
+ this.buttonOwnerView.setAsActiveView();
+
if (refresh) {
window.refresh();
}
@@ -318,7 +320,7 @@
var i, tmp, view = this,
grid = view.viewGrid,
activeView = view.parentWindow && view.parentWindow.activeView,
- allProperties = activeView.getContextInfo(false, true, false, true) ||
{},
+ allProperties = this.sourceView.getContextInfo(false, true, false,
true) || {},
selection = grid.getSelectedRecords() || [],
len = selection.length,
allRows = grid.data.allRows || grid.data;
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits