Fixes Issue 27008: "Recent Documents" is not working under some circumstances
authorShankar Balachandran <shankar.balachandran@openbravo.com>
Mon, 21 Jul 2014 10:18:17 +0530
changeset 24173 068ce411734f
parent 24172 d7c19111c4f8
child 24174 f2e505b2c964
Fixes Issue 27008: "Recent Documents" is not working under some circumstances

The full view is prepared if the record is navigated directly as the target tab may be part of any parent tab.
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	Wed Jul 16 21:28:59 2014 +0530
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Mon Jul 21 10:18:17 2014 +0530
@@ -755,9 +755,10 @@
 
     this.standardWindow.addView(childView);
 
-    if (this.childTabSet.tabs.length > 0) {
-      // If it is a child tab that is not in the first position, load a basic child view
-      // to ensure a lazy inizialitazion of the contents.
+    if (this.childTabSet.tabs.length > 0 && !this.standardWindow.targetTabId) {
+      // If it is a child tab that is not in the first position and if it is not a
+      // direct navigation to the record (issue 27008), load a basic child view
+      // to ensure a lazy initialization of the contents.
       // Once the tab be selected, the proper content will be loaded.
       this.prepareBasicChildView(childView);
     } else {