Roo/XComponent.js
authorAlan Knowles <alan@akbkhome.com>
Sun, 31 Jul 2011 11:35:20 +0000 (19:35 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sun, 31 Jul 2011 11:35:20 +0000 (19:35 +0800)
Roo/XComponent.js

index 85f10d1..060df50 100644 (file)
@@ -129,6 +129,7 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, {
     {
         
         el = el || false;
+        var hp = this.parent ? 1 : 0;
         
         if (!el && typeof(this.parent) == 'string' && this.parent[0] == '#') {
             // if parent is a '#.....' string, then let's use that..
@@ -156,8 +157,8 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, {
                          closeOnTab: true,
                          tabPosition: 'top',
                           //resizeTabs: true,
-                         alwaysShowTabs: el ? false :  true,
-                         hideTabs: el ? true :  false,
+                         alwaysShowTabs: el && hp? false :  true,
+                         hideTabs: el || !hp ? true :  false,
                          minTabWidth: 140
                      }
                  })