details:   https://code.openbravo.com/erp/devel/pi/rev/9fa863bf7f35
changeset: 23011:9fa863bf7f35
user:      David Baz Fayos <david.baz <at> openbravo.com>
date:      Mon May 12 11:45:41 2014 +0200
summary:   Related to issue 24705: Add some comments/help

diffstat:

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

diffs (39 lines):

diff -r 086489414e20 -r 9fa863bf7f35 
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
 Mon May 12 09:19:51 2014 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 Mon May 12 11:45:41 2014 +0200
@@ -680,8 +680,13 @@
     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.
+      // Once the tab be selected, the proper content will be loaded.
       this.prepareBasicChildView(childView);
     } else {
+      // If the child tab is in first position, the content needs to be 
displayed immediately
+      // once the parent view is loaded.
       this.prepareFullChildView(childView);
     }
 
@@ -692,6 +697,11 @@
     OB.TestRegistry.register('org.openbravo.client.application.ChildTab_' + 
this.tabId + '_' + childView.tabId, childView.tab);
   },
 
+  // ** {{{ prepareBasicChildView }}} **
+  // It adds a tab with a basic layout. Once the tab is selected/set as active
+  // a call to 'prepareFullChildView' is performed. The purpose of this view
+  // is have a lazy initialization of the tab, so the proper content is
+  // loaded only when it is required.
   prepareBasicChildView: function (childView) {
     var me = this;
 
@@ -763,6 +773,9 @@
     this.childTabSet.addTab(childTabDef);
   },
 
+  // ** {{{ prepareBasicChildView }}} **
+  // It adds a tab with the whole view content based on the provided 
'childView'.
+  // If 'tab' parameter is provided, the 'childView' content is loaded inside 
the provided tab.
   prepareFullChildView: function (childView, tab) {
     var length, i, actionButton, lastCalledSizeFunction;
 

------------------------------------------------------------------------------
"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