Roo/bootstrap/TabPanel.js
authorAlan Knowles <alan@roojs.com>
Wed, 4 Feb 2015 07:00:35 +0000 (15:00 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 4 Feb 2015 07:00:35 +0000 (15:00 +0800)
Roo/bootstrap/TabPanel.js

index 6829544..61e2e4d 100644 (file)
@@ -32,6 +32,14 @@ Roo.bootstrap.TabPanel = function(config){
          */
         'changed': true
      });
+    this.navId = this.navId  || Roo.id();
+    
+          // not really needed.. but just in case.. parent should be a NavGroup.
+    var tg = Roo.bootstrap.TabGroup.get(p.navId);
+    this.navId = this.navId || p.navId;
+    Roo.log(['register', tg, this]);
+    tg.register(this);
+    
 };
 
 Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
@@ -81,13 +89,7 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
         }
         // tabgroup.
         var p = this.parent();
-        if (typeof(p.navId) != 'undefined') {
-            // not really needed.. but just in case.. parent should be a NavGroup.
-            var tg = Roo.bootstrap.TabGroup.get(p.navId);
-            this.navId = this.navId || p.navId;
-            Roo.log(['register', tg, this]);
-            tg.register(this);
-        }
+       
         
         
     },