details: https://code.openbravo.com/erp/devel/pi/rev/a616d63dd17f changeset: 13809:a616d63dd17f user: Martin Taal <martin.taal <at> openbravo.com> date: Tue Sep 20 14:46:57 2011 +0200 summary: Prevent js error with old viewdefinition in json
details: https://code.openbravo.com/erp/devel/pi/rev/61628b69bbab changeset: 13810:61628b69bbab user: Martin Taal <martin.taal <at> openbravo.com> date: Tue Sep 20 14:47:37 2011 +0200 summary: Fixes issue 18149: Field shows error when form is shown Clear the errors at the end of opening a new form diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js | 5 ++++- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diffs (34 lines): diff -r fd6ed8167008 -r 61628b69bbab modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js Tue Sep 20 14:30:36 2011 +0200 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js Tue Sep 20 14:47:37 2011 +0200 @@ -191,7 +191,6 @@ // focus is done automatically, prevent the focus event if needed // the focus event will set the active view - this.clearErrors(); if (!isNew) { this.validateAfterFicReturn = true; // If editing a document set to recent documents @@ -205,6 +204,10 @@ this.view.statusBar.mode = 'NEW'; this.view.statusBar.setContentLabel(this.view.statusBar.newIcon, 'OBUIAPP_New'); } + + // do at the end because during initial form drawing + // fields get blurred and will show an error + this.clearErrors(); }, editNewRecord: function(preventFocus){ diff -r fd6ed8167008 -r 61628b69bbab 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 Tue Sep 20 14:30:36 2011 +0200 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js Tue Sep 20 14:47:37 2011 +0200 @@ -131,7 +131,7 @@ } if (!defaultView) { for (i = 0; i < length; i++) { - if (views[i].viewDefinition.isDefault) { + if (views[i].viewDefinition && views[i].viewDefinition.isDefault) { defaultView = views[i]; break; } ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
