details: /erp/devel/pi/rev/0e36af6daf59
changeset: 10487:0e36af6daf59
user: Antonio Moreno <antonio.moreno <at> openbravo.com>
date: Wed Feb 09 17:31:26 2011 +0100
summary: Improved refresh so that it still calls the callback, so the final
message of processes is shown
details: /erp/devel/pi/rev/89d852da8661
changeset: 10488:89d852da8661
user: Antonio Moreno <antonio.moreno <at> openbravo.com>
date: Wed Feb 09 18:38:33 2011 +0100
summary: Do not hide the message box after a refresh
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
| 11 +++-----
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
| 13 ++++++++++
2 files changed, 17 insertions(+), 7 deletions(-)
diffs (58 lines):
diff -r 16e1d3817f01 -r 89d852da8661
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Wed Feb 09 18:36:01 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Wed Feb 09 18:38:33 2011 +0100
@@ -1114,24 +1114,21 @@
}
if (!this.isShowingForm) {
- this.messageBar.hide();
- this.viewGrid.targetRecordId =
this.viewGrid.getSelectedRecord()[OB.Constants.ID];
- this.viewGrid.invalidateCache();
+ this.viewGrid.refreshGrid();
} else {
var view = this;
if (this.viewForm.hasChanged) {
var callback = function(ok){
if (ok) {
- this.viewGrid.targetRecordId =
this.viewGrid.getSelectedRecord()[OB.Constants.ID];
- this.viewGrid.invalidateCache();
+ this.viewGrid.refreshGrid();
}
};
isc.ask(OB.I18N.getLabel('OBUIAPP_ConfirmRefresh'), callback);
} else {
- this.viewGrid.targetRecordId =
this.viewGrid.getSelectedRecord()[OB.Constants.ID];
- this.viewGrid.invalidateCache();
+ this.viewGrid.refreshGrid();
}
}
+ refreshCallback();
},
saveRow: function(){
diff -r 16e1d3817f01 -r 89d852da8661
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
Wed Feb 09 18:36:01 2011 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
Wed Feb 09 18:38:33 2011 +0100
@@ -425,9 +425,22 @@
}
}
+ if(this.actionAfterDataArrived){
+ this.actionAfterDataArrived();
+ this.actionAfterDataArrived = null;
+ }
+
return ret;
},
+ refreshGrid: function(callback){
+ if(this.getSelectedRecord()){
+ this.targetRecordId = this.getSelectedRecord()[OB.Constants.ID];
+ }
+ this.actionAfterDataArrived = callback;
+ this.invalidateCache();
+ },
+
// with a delay to handle the target record when the body has been drawn
delayedHandleTargetRecord: function(startRow, endRow){
var rowTop, recordIndex, i, data = this.data, tmpTargetRecordId =
this.targetRecordId;
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits