details: https://code.openbravo.com/erp/devel/pi/rev/671f7127ff37
changeset: 16786:671f7127ff37
user: Martin Taal <martin.taal <at> openbravo.com>
date: Thu Jun 07 19:56:16 2012 +0200
summary: Fixes issue 20683: JS error in "Window Personalization" window
The case that the form personalization was opened from the window
personalization window hammer icon
was not taken into account, also solve the issue that deleting and then saving
a new form personalization
record results in an error
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalize-form.js
| 14 +++++++--
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (46 lines):
diff -r 05e6bb999e09 -r 671f7127ff37
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalize-form.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalize-form.js
Thu Jun 07 10:55:07 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-personalize-form.js
Thu Jun 07 19:56:16 2012 +0200
@@ -524,7 +524,7 @@
prompt: OB.I18N.getLabel('OBUIAPP_Personalization_Toolbar_Delete'),
updateState: function () {
// never allow delete when opened from the maintenance window
- this.setDisabled(this.openedFromMaintenanceWindow ||
!this.view.form.view.getFormPersonalization(false) ||
!this.view.form.view.getFormPersonalization(false).canDelete);
+ this.setDisabled(this.view.openedFromMaintenanceWindow ||
(this.view.form && (!this.view.form.view.getFormPersonalization(false) ||
!this.view.form.view.getFormPersonalization(false).canDelete)));
},
keyboardShortcutId: 'ToolBar_Eliminate'
};
@@ -589,7 +589,7 @@
// save the new form layout to the server and updates the preview form
save: function (callback) {
var params, me = this,
- newDataFields, formPers = this.form.view.getFormPersonalization();
+ newDataFields, formPers = (this.openedFromMaintenanceWindow ?
this.personalizationData : this.form.view.getFormPersonalization());
// if there is a personalization id then use that
// this ensures that a specific record will be updated
@@ -644,7 +644,10 @@
// overwrite what we have
me.personalizationData.form = newDataFields;
- me.form.view.standardWindow.updateFormPersonalization(me.form.view,
me.personalizationData);
+ if (!me.openedFromMaintenanceWindow) {
+ // called from normal window
+ me.form.view.standardWindow.updateFormPersonalization(me.form.view,
me.personalizationData);
+ }
me.initializing = true;
me.isNew = false;
@@ -696,8 +699,11 @@
// close when returned
me.doClose(true);
- personalization = me.getStandardWindow().getClass().personalization;
+ personalization = me.getStandardWindow().getClass().personalization;
personalization[me.tabId] = null;
+ if (me.getStandardWindow().getClass().personalization.forms) {
+ me.getStandardWindow().getClass().personalization.forms[me.tabId] =
null;
+ }
});
},
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits