roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Wed, 22 Jan 2014 13:05:24 +0000 (21:05 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 22 Jan 2014 13:05:24 +0000 (21:05 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 2dbcb23..71b1ffb 100644 (file)
@@ -735,6 +735,52 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
  * row
  * 
  */
+/**
+ * @class Roo.bootstrap.Header
+ * @extends Roo.bootstrap.Component
+ * Bootstrap Header class
+  * @cfg {String} html content of header
+  * @cfg {Number} level (1|2|3|4|5|6|7) default 1
+    
+  }
+ * @constructor
+ * Create a new Header
+ * @param {Object} config The config object
+ */
+
+
+Roo.bootstrap.Header  = function(config){
+    Roo.bootstrap.Header.superclass.constructor.call(this, config);
+};
+
+Roo.extend(Roo.bootstrap.Header, Roo.bootstrap.Component,  {
+    
+    //href : false,
+    html : false,
+    level : 1,
+    
+    
+    
+    getAutoCreate : function(){
+        
+        var cfg = {
+            tag: 'h' + (1 *this.cfg.level),
+            html: this.html || 'fill in html'
+        } ;
+        
+        return cfg;
+    }
+   
+});
+
+
+ /*
+ * - LGPL
+ *
+ * row
+ * 
+ */
 
 /**
  * @class Roo.bootstrap.Menu
index c1fada5..d197490 100644 (file)
@@ -22,6 +22,8 @@ Roo.bootstrap.Img=function(A){Roo.bootstrap.Img.superclass.constructor.call(this
 //Roo/bootstrap/Input.js
 Roo.bootstrap.Input=function(A){Roo.bootstrap.Input.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Input,Roo.bootstrap.Component,{fieldLabel:'',inputType:'text',disabled:false,getAutoCreate:function(){var A=this.parent();var B=A.labelAlign;var id=Roo.id();var C={cls:'form-group'};var D={tag:'input',id:id,type:this.inputType,cls:'form-control',placeholder:this.placeholder||''};switch(B){case 'left':C.cn=[{tag:'label','for':id,cls:'col-sm-2 control-label',html:this.fieldLabel},{cls:"col-sm-10",cn:[D]}];break;default:C.cn=[{tag:'label',html:this.fieldLabel},D];break;}if(this.disabled){D.disabled=true;}return C;},setDisabled:function(v){var i=this.el.select('input',true).dom;if(v){i.removeAttribute('disabled');return;}
 i.setAttribute('disabled','true');}});
+//Roo/bootstrap/Header.js
+Roo.bootstrap.Header=function(A){Roo.bootstrap.Header.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Header,Roo.bootstrap.Component,{html:false,level:1,getAutoCreate:function(){var A={tag:'h'+(1*this.cfg.level),html:this.html||'fill in html'};return A;}});
 //Roo/bootstrap/Menu.js
 Roo.bootstrap.Menu=function(A){Roo.bootstrap.Menu.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Menu,Roo.bootstrap.Component,{triggerEl:false,getChildContainer:function(){return this.el;},getAutoCreate:function(){return {tag:'ul',cls:'dropdown-menu'};},initEvents:function(){this.triggerEl.on('click',this.toggle,this);this.triggerEl.addClass('dropdown-toggle');},toggle:function(e){if(Roo.get(e.getTarget()).findParent('.dropdown-menu')){return;}var A=this.triggerEl.hasClass('open');this.clearMenus(e);this.triggerEl[A?'removeClass':'addClass']('open');this.triggerEl.focus();Roo.log(e);e.preventDefault();},clearMenus:function(){Roo.select('.dropdown-toggle',true).each(function(aa){if(!aa.hasClass('open')){return;}
 aa.removeClass('open');})}});