details: https://code.openbravo.com/erp/devel/pi/rev/6e76a2a1af99
changeset: 15566:6e76a2a1af99
user: David Baz Fayos <david.baz <at> openbravo.com>
date: Wed Feb 22 14:38:41 2012 +0100
summary: Fixed issue 19827: Now you can't leave a form with invalid data
by pressing next/previous statusbar buttons
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-statusbar.js
| 11 ++++++++-
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 324daab48217 -r 6e76a2a1af99
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-statusbar.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-statusbar.js
Wed Feb 22 12:48:24 2012 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-statusbar.js
Wed Feb 22 14:38:41 2012 +0100
@@ -75,17 +75,24 @@
},
doAction: function () {
- var rowNum, newRowNum, newRecord, theButtonBar, i, length;
+ var invalidFormState = this.view.viewForm.hasChanged &&
!this.view.viewForm.validateForm(),
+ rowNum, newRowNum, newRecord, theButtonBar, i, length;
if (this.buttonType === 'previous') {
+ if (invalidFormState) {
+ return;
+ }
this.view.editNextPreviousRecord(false);
} else if (this.buttonType === 'maximize') {
this.view.maximize();
} else if (this.buttonType === 'restore') {
this.view.restore();
} else if (this.buttonType === 'next') {
+ if (invalidFormState) {
+ return;
+ }
this.view.editNextPreviousRecord(true);
} else if (this.buttonType === 'close') {
- if (this.view.viewForm.hasChanged && !this.view.viewForm.validateForm())
{
+ if (invalidFormState) {
return;
}
this.view.viewForm.doClose();
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits