details: https://code.openbravo.com/erp/devel/pi/rev/c7a40d5e4b41
changeset: 15957:c7a40d5e4b41
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Fri Mar 30 10:58:20 2012 +0200
summary: fixed bug 20160, fixed bug 20145: RO tab is set when reopening
Caching WindowSettingsActionHandler response on first window open and reusing
it in future openings.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
| 16 ++++++++-
1 files changed, 13 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r 4af49610cdb2 -r c7a40d5e4b41
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
Thu Mar 29 16:39:23 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
Fri Mar 30 10:58:20 2012 +0200
@@ -104,6 +104,8 @@
// method is also called explicitly from the personalization window
if (!this.getClass().windowSettingsRead) {
this.readWindowSettings();
+ } else if (this.getClass().windowSettingsCached) {
+ this.setWindowSettings(this.getClass().windowSettingsCached);
} else if (this.getClass().personalization) {
this.setPersonalization(this.getClass().personalization);
}
@@ -200,17 +202,25 @@
// set window specific user settings, purposely set on class level
setWindowSettings: function (data) {
- var i, defaultView, persDefaultValue, views, length, t, tab, view, field,
button, alwaysReadOnly, st, stView, stBtns, stBtn, disabledFields;
+ var i, defaultView, persDefaultValue, views, length, t, tab, view, field,
button, alwaysReadOnly, st, stView, stBtns, stBtn, disabledFields,
personalization;
if (data) {
this.getClass().autoSave = data.autoSave;
this.getClass().windowSettingsRead = true;
+ this.getClass().windowSettingsCached = data;
this.getClass().uiPattern = data.uiPattern;
this.getClass().showAutoSaveConfirmation = data.showAutoSaveConfirmation;
}
- if (data && data.personalization) {
- this.setPersonalization(data.personalization);
+ if (this.getClass().personalization) {
+ // Don't overwrite personalization if it is already set in class
+ personalization = this.getClass().personalization;
+ } else if (data && data.personalization) {
+ personalization = data.personalization;
+ }
+
+ if (personalization) {
+ this.setPersonalization(personalization);
}
// set the views to readonly
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits