sync
[roojs1] / Roo / bootstrap / dash / TabPane.js
index 59e59d1..ebf6472 100644 (file)
@@ -8,6 +8,7 @@ Roo.bootstrap.dash = Roo.bootstrap.dash || {};
 /**
  * @class Roo.bootstrap.TabPane
  * @extends Roo.bootstrap.Component
+ * @children  Roo.bootstrap.Graph Roo.bootstrap.Column
  * Bootstrap TabPane class
  * @cfg {Boolean} active (false | true) Default false
  * @cfg {String} title title of panel
@@ -21,6 +22,16 @@ Roo.bootstrap.dash = Roo.bootstrap.dash || {};
 Roo.bootstrap.dash.TabPane = function(config){
     Roo.bootstrap.dash.TabPane.superclass.constructor.call(this, config);
     
+    this.addEvents({
+        // raw events
+        /**
+         * @event activate
+         * When a pane is activated
+         * @param {Roo.bootstrap.dash.TabPane} pane
+         */
+        "activate" : true
+         
+    });
 };
 
 Roo.extend(Roo.bootstrap.dash.TabPane, Roo.bootstrap.Component,  {
@@ -30,19 +41,13 @@ Roo.extend(Roo.bootstrap.dash.TabPane, Roo.bootstrap.Component,  {
     
     // the tabBox that this is attached to.
     tab : false,
-    
-//    
-//    getBox : function()
-//    {
-//        return this.el.findParent('.nav-tabs-custom', false, true);
-//    },
-    
+     
     getAutoCreate : function() 
     {
         var cfg = {
             tag: 'div',
             cls: 'tab-pane'
-        }
+        };
         
         if(this.active){
             cfg.cls += ' active';
@@ -52,7 +57,7 @@ Roo.extend(Roo.bootstrap.dash.TabPane, Roo.bootstrap.Component,  {
     },
     initEvents  : function()
     {
-        Roo.log('trigger add pane handler');
+        //Roo.log('trigger add pane handler');
         this.parent().fireEvent('addpane', this)
     },
     
@@ -66,7 +71,7 @@ Roo.extend(Roo.bootstrap.dash.TabPane, Roo.bootstrap.Component,  {
             return;
         }
         this.title = str;
-        this.tab.select('a'.true).first().dom.innerHTML = str;
+        this.tab.select('a'true).first().dom.innerHTML = str;
         
     }