details:   https://code.openbravo.com/erp/devel/pi/rev/052c07be4a9d
changeset: 23092:052c07be4a9d
user:      Guillermo Gil <guillermo.gil <at> openbravo.com>
date:      Thu May 22 13:58:26 2014 +0200
summary:   Fixed issue 26660: Read Only tabs are editable when tab level is 2

Lazy loading was not taking into account readOnly logic
readOnly logic added on initWidget only for lazy loaded tabs

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r 33e1b63f6192 -r 052c07be4a9d 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 Thu May 22 10:00:01 2014 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 Thu May 22 13:58:26 2014 +0200
@@ -264,6 +264,14 @@
 
     this.toolBar.updateButtonState(true, false, true);
 
+    // It will only enter if this is a lazy initialized tab
+    // this.standardWindow.getClass().uiPattern will only exists after 
setWindowSettings is executed
+    if (this.standardWindow.getClass().uiPattern) {
+      this.setReadOnly(this.standardWindow.getClass().uiPattern[this.tabId] 
=== isc.OBStandardView.UI_PATTERN_READONLY);
+      
this.setSingleRecord(this.standardWindow.getClass().uiPattern[this.tabId] === 
isc.OBStandardView.UI_PATTERN_SINGLERECORD);
+      
this.setEditOrDeleteOnly(this.standardWindow.getClass().uiPattern[this.tabId] 
=== isc.OBStandardView.UI_PATTERN_EDITORDELETEONLY);
+    }
+
     // Update the subtab visibility before the tabs are shown to the client
     this.handleDefaultTreeView();
     this.updateSubtabVisibility();

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to