4 * base class for bootstrap elements..
8 Roo.bootstrap = Roo.bootstrap || {};
10 * @class Roo.bootstrap.Component
11 * @extends Roo.Component
12 * Bootstrap Component base class
13 * @cfg {String} cls css class
14 * @cfg {String} style any extra css
17 * Do not use directly - it does not do anything..
18 * @param {Object} config The config object
23 Roo.bootstrap.Component = function(config){
24 Roo.bootstrap.Component.superclass.constructor.call(this, config);
27 Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent, {
35 initEvents : function() { },
40 // returns the parent component..
41 return Roo.ComponentMgr.get(this.parentId)
47 onRender : function(ct, position)
49 Roo.bootstrap.Component.superclass.onRender.call(this, ct, position);
53 var cfg = Roo.apply({}, this.getAutoCreate());
57 cfg.cls += ' ' + this.cls;
59 if (this.style) { // fixme needs to support more complex style data.
60 cfg.style = this.style;
62 this.el = ct.createChild(cfg, position);
63 if(this.tabIndex !== undefined){
64 this.el.dom.setAttribute('tabIndex', this.tabIndex);
70 getChildContainer : function()
75 addxtype : function (tree, cntr) {
77 cntr = typeof(cntr == 'undefined' ) ? 'getChildContainer' : cntr;
79 if (tree.xtype != 'Body') {
81 cn = Roo.factory(tree);
83 cn.parentType = this.xtype; //??
84 cn.parentId = this.id;
85 cn.render(this[cntr]());
86 // then add the element..
89 if (typeof (tree.menu) != 'undefined') {
90 tree.menu.parentType = cn.xtype;
91 tree.menu.triggerEl = cn.el;
92 nitems.push(cn.addxtype(Roo.apply({}, tree.menu)));
95 if (typeof (tree.buttons) != 'undefined' && typeof(cn.getButtonContainer) == 'function') {
97 for(var i =0;i < tree.buttons.length;i++) {
98 nitems.push(cn.addxtype(Roo.apply({}, tree.buttons[i]), 'getButtonContainer'));
103 if (!tree.items || !tree.items.length) {
107 var items = tree.items;
110 //Roo.log(items.length);
112 for(var i =0;i < items.length;i++) {
113 nitems.push(cn.addxtype(Roo.apply({}, items[i])));
133 Roo.bootstrap.Body = function(config){
134 Roo.bootstrap.Body.superclass.constructor.call(this, config);
137 Roo.extend(Roo.bootstrap.Body, Roo.bootstrap.Component, {
142 onRender : function(ct, position){
143 this.el = Roo.get(document.body);
145 //this.el.addClass([this.fieldClass, this.cls]);
163 * @class Roo.bootstrap.ButtonGroup
164 * @extends Roo.bootstrap.Component
165 * Bootstrap ButtonGroup class
166 * @cfg {string} size lg | sm | xs (default empty normal)
167 * @cfg {string} align vertical | justified (default none)
168 * @cfg {string} direction up | down (default down)
173 * @param {Object} config The config object
176 Roo.bootstrap.ButtonGroup = function(config){
177 Roo.bootstrap.ButtonGroup.superclass.constructor.call(this, config);
180 Roo.extend(Roo.bootstrap.ButtonGroup, Roo.bootstrap.Component, {
193 getAutoCreate : function(){
195 var cfg = Roo.apply({}, Roo.bootstrap.ButtonGroup.superclass.getAutoCreate.call(this));
197 cfg.html = this.html || cfg.html;
208 if (['vertical','justified'].indexOf(this.align)!==-1) {
209 cfg.cls = 'btn-group-' + this.align;
211 if (this.align == 'justified') {
212 console.log(this.items);
216 if (['lg','sm','xs'].indexOf(this.size)!==-1) {
217 cfg.cls += ' btn-group-' + this.size;
220 if (this.direction == 'up') {
221 cfg.cls += ' dropup' ;
237 * @class Roo.bootstrap.Button
238 * @extends Roo.bootstrap.Component
239 * Bootstrap Button class
240 * @cfg {String} html The button content
241 * @cfg {String} weight default (or empty) | primary | success | info | warning
242 * @cfg {String} size empty | lg | sm | xs
243 * @cfg {String} tag empty | a | input | submit
244 * @cfg {String} href empty or href
245 * @cfg {Boolean} disabled false | true
246 * @cfg {Boolean} isClose false | true
247 * @cfg {String} empty | see glyphicon reference list
248 * @cfg {String} badge text for badge
251 * Create a new button
252 * @param {Object} config The config object
256 Roo.bootstrap.Button = function(config){
257 Roo.bootstrap.Button.superclass.constructor.call(this, config);
262 * The raw click event for the entire grid.
263 * @param {Roo.EventObject} e
269 Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, {
290 getAutoCreate : function(){
297 if (['a', 'button', 'input', 'submit'].indexOf(this.tag) < 0) {
298 throw "Invalid value for tag: " + this.tag + ". must be a, button, input or submit.";
303 cfg.html = this.html || cfg.html;
305 if (this.toggle===true) {
313 'data-off-text':'OFF',
314 cls: 'slider-button',
320 if (['default', 'primary', 'success', 'info', 'warning', 'danger', 'link'].indexOf(this.weight) > -1) {
321 cfg.cls += ' '+this.weight;
330 cfg["aria-hidden"] = true;
332 cfg.html = "×";
338 if (this.theme==='default') {
341 if (this.parentType != 'Navbar') {
342 this.weight = this.weight.length ? this.weight : 'default';
344 if (['default', 'primary', 'success', 'info', 'warning', 'danger', 'link'].indexOf(this.weight) > -1) {
346 cfg.cls += ' btn-' + this.weight;
348 } else if (this.theme==='glow') {
353 if (['default', 'primary', 'success', 'info', 'warning', 'danger', 'link'].indexOf(this.weight) > -1) {
355 cfg.cls += ' ' + this.weight;
361 this.cls += ' inverse';
366 cfg.cls += ' active';
369 cfg.cls += this.size.length ? (' btn-' + this.size) : '';
371 //gsRoo.log(this.parentType);
372 if (this.parentType === 'Navbar') {
379 href : this.href || '#'
382 cfg.cn[0].html = this.html + ' <span class="caret"></span>';
383 cfg.cls += ' dropdown';
388 } else if (this.menu) {
390 cfg.cls += ' dropdown test';
396 cfg.disabled = 'disabled';
400 Roo.log('changing to ul' );
402 this.glyphicon = 'caret';
405 if (this.glyphicon) {
406 cfg.html = ' ' + cfg.html;
411 cls: 'glyphicon glyphicon-' + this.glyphicon
437 if (cfg.tag !== 'a' && this.href !== '') {
438 throw "Tag must be a to set href.";
439 } else if (this.href.length > 0) {
440 cfg.href = this.href;
445 initEvents: function() {
446 // Roo.log('init events?');
447 // Roo.log(this.el.dom);
448 this.el.select('a',true).on('click',
450 this.fireEvent('click', this);
466 * @class Roo.bootstrap.Column
467 * @extends Roo.bootstrap.Component
468 * Bootstrap Column class
469 * @cfg {number} colspan Number of columsn to span
472 * Create a new Column
473 * @param {Object} config The config object
476 Roo.bootstrap.Column = function(config){
477 Roo.bootstrap.Column.superclass.constructor.call(this, config);
480 Roo.extend(Roo.bootstrap.Column, Roo.bootstrap.Component, {
489 getAutoCreate : function(){
490 var cfg = Roo.apply({}, Roo.bootstrap.Column.superclass.getAutoCreate.call(this));
498 ['xs','sm','md','lg'].map(function(size){
499 if (settings[size]) {
500 cfg.cls += ' col-' + size + '-' + settings[size];
520 * @class Roo.bootstrap.Container
521 * @extends Roo.bootstrap.Component
522 * Bootstrap Container class
523 * @cfg {Boolean} jumbotron is it a jubmotron element
524 * @cfg {String} html content of element
527 * Create a new Container
528 * @param {Object} config The config object
531 Roo.bootstrap.Container = function(config){
532 Roo.bootstrap.Container.superclass.constructor.call(this, config);
535 Roo.extend(Roo.bootstrap.Container, Roo.bootstrap.Component, {
537 jumbotron : false, // doc me
539 getAutoCreate : function(){
545 if (this.jumbotron) {
546 cfg.cls = 'jumbotron';
552 cfg.html = this.html || cfg.html;
566 * @class Roo.bootstrap.Form
567 * @extends Roo.bootstrap.Component
568 * Bootstrap Form class
569 * @cfg {String} method GET | POST (default POST)
570 * @cfg {String} labelAlign top | left (default top)
573 * Create a new button
574 * @param {Object} config The config object
578 Roo.bootstrap.Form = function(config){
579 Roo.bootstrap.Form.superclass.constructor.call(this, config);
582 * @event clientvalidation
583 * If the monitorValid config option is true, this event fires repetitively to notify of valid state
585 * @param {Boolean} valid true if the form has passed client-side validation
587 clientvalidation: true,
590 * Fires when the form is rendered
591 * @param {Roo.form.Form} form
597 Roo.extend(Roo.bootstrap.Form, Roo.bootstrap.Component, {
600 getAutoCreate : function(){
604 method : this.method || 'POST',
605 id : this.id || Roo.id(),
609 if (this.labelAlign == 'left' ) {
610 cfg.cls += ' form-horizontal';
627 * @class Roo.bootstrap.ButtonGroup
628 * @extends Roo.bootstrap.Component
629 * Bootstrap ButtonGroup class
630 * @cfg {string} size lg | sm | xs (default empty normal)
631 * @cfg {string} align vertical | justified (default none)
632 * @cfg {string} direction up | down (default down)
637 * @param {Object} config The config object
640 Roo.bootstrap.Img = function(config){
641 Roo.bootstrap.Img.superclass.constructor.call(this, config);
644 Roo.extend(Roo.bootstrap.Img, Roo.bootstrap.Component, {
652 cls: 'img-responsive',
656 getAutoCreate : function(){
658 var cfg = Roo.apply({}, Roo.bootstrap.Img.superclass.getAutoCreate.call(this));
660 cfg.html = this.html || cfg.html;
662 cfg.src = this.src || cfg.src;
664 if (['rounded','circle','thumbnail'].indexOf(this.border)>-1) {
665 cfg.cls += ' img-' + this.border;
684 * @class Roo.bootstrap.Input
685 * @extends Roo.bootstrap.Component
686 * Bootstrap Input class
687 * @cfg {boolean} disabled is it disabled
688 * @cfg {string} fieldLabel - the label associated
689 * @cfg {string} inputType - input / file submit ...
690 * @cfg {string} placeholder - placeholder to put in text.
691 * @cfg {string} before - input group add on before
692 * @cfg {string} after - input group add on after
697 * @param {Object} config The config object
700 Roo.bootstrap.Input = function(config){
701 Roo.bootstrap.Input.superclass.constructor.call(this, config);
705 Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component, {
714 getAutoCreate : function(){
716 var parent = this.parent();
718 var align = parent.labelAlign;
723 cls: 'form-group' //input-group
729 type : this.inputType,
730 cls : 'form-control',
731 placeholder : this.placeholder || ''
738 var inputblock = input;
740 if (this.before || this.after) {
749 cls : 'input-group-addon',
753 inputblock.cn.push(input);
757 cls : 'input-group-addon',
765 Roo.log(this.fieldLabel.length);
767 case align==='left' && this.fieldLabel.length:
774 cls : 'col-sm-2 control-label',
775 html : this.fieldLabel
787 case this.fieldLabel.length:
793 //cls : 'input-group-addon',
794 html : this.fieldLabel
822 setDisabled : function(v)
824 var i = this.el.select('input',true).dom;
826 i.removeAttribute('disabled');
830 i.setAttribute('disabled','true');
842 * @class Roo.bootstrap.Header
843 * @extends Roo.bootstrap.Component
844 * Bootstrap Header class
845 * @cfg {String} html content of header
846 * @cfg {Number} level (1|2|3|4|5|6|7) default 1
850 * Create a new Header
851 * @param {Object} config The config object
855 Roo.bootstrap.Header = function(config){
856 Roo.bootstrap.Header.superclass.constructor.call(this, config);
859 Roo.extend(Roo.bootstrap.Header, Roo.bootstrap.Component, {
867 getAutoCreate : function(){
870 tag: 'h' + (1 *this.level),
871 html: this.html || 'fill in html'
889 * @class Roo.bootstrap.Menu
890 * @extends Roo.bootstrap.Component
891 * Bootstrap Menu class - container for MenuItems
895 * @param {Object} config The config object
899 Roo.bootstrap.Menu = function(config){
900 Roo.bootstrap.Menu.superclass.constructor.call(this, config);
903 Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component, {
910 getChildContainer : function() {
914 getAutoCreate : function(){
916 //if (['right'].indexOf(this.align)!==-1) {
917 // cfg.cn[1].cls += ' pull-right'
921 cls : 'dropdown-menu'
925 if (this.type==='submenu') {
926 cfg.cls='submenu active'
931 initEvents : function() {
932 // Roo.log("ADD event");
933 // Roo.log(this.triggerEl.dom);
934 this.triggerEl.on('click', this.toggle, this);
935 this.triggerEl.addClass('dropdown-toggle');
940 //Roo.log(e.getTarget());
941 // Roo.log(this.triggerEl.dom);
942 if (Roo.get(e.getTarget()).findParent('.dropdown-menu')) {
945 var isActive = this.triggerEl.hasClass('open');
946 // if disabled.. ingore
948 //if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
949 // if mobile we use a backdrop because click events don't delegate
950 // $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
953 //var relatedTarget = { relatedTarget: this }
954 //$parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
956 //if (e.isDefaultPrevented()) return;
958 this.triggerEl[isActive ? 'removeClass' : 'addClass']('open');
960 // .trigger('shown.bs.dropdown', relatedTarget)
962 this.triggerEl.focus();
968 clearMenus : function()
970 //$(backdrop).remove()
971 Roo.select('.dropdown-toggle',true).each(function(aa) {
972 if (!aa.hasClass('open')) {
976 aa.removeClass('open');
977 //var parent = getParent($(this))
978 //var relatedTarget = { relatedTarget: this }
980 //$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
981 //if (e.isDefaultPrevented()) return
982 //$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
1000 * @class Roo.bootstrap.MenuItem
1001 * @extends Roo.bootstrap.Component
1002 * Bootstrap MenuItem class
1003 * @cfg {String} html the menu label
1004 * @cfg {String} href the link
1008 * Create a new MenuItem
1009 * @param {Object} config The config object
1013 Roo.bootstrap.MenuItem = function(config){
1014 Roo.bootstrap.MenuItem.superclass.constructor.call(this, config);
1017 Roo.extend(Roo.bootstrap.MenuItem, Roo.bootstrap.Component, {
1024 getAutoCreate : function(){
1037 cfg.cn[0].href = this.href || cfg.cn[0].href ;
1038 cfg.cn[0].html = this.html || cfg.cn[0].html ;
1055 * @class Roo.bootstrap.MenuItem
1056 * @extends Roo.bootstrap.Component
1057 * Bootstrap MenuItem class
1058 * @cfg {String} html the menu label
1059 * @cfg {String} href the link
1063 * Create a new MenuItem
1064 * @param {Object} config The config object
1068 Roo.bootstrap.MenuSeparator = function(config){
1069 Roo.bootstrap.MenuSeparator.superclass.constructor.call(this, config);
1072 Roo.extend(Roo.bootstrap.MenuSeparator, Roo.bootstrap.Component, {
1074 getAutoCreate : function(){
1089 <div class="modal fade">
1090 <div class="modal-dialog">
1091 <div class="modal-content">
1092 <div class="modal-header">
1093 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
1094 <h4 class="modal-title">Modal title</h4>
1096 <div class="modal-body">
1097 <p>One fine body…</p>
1099 <div class="modal-footer">
1100 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
1101 <button type="button" class="btn btn-primary">Save changes</button>
1103 </div><!-- /.modal-content -->
1104 </div><!-- /.modal-dialog -->
1105 </div><!-- /.modal -->
1115 * @class Roo.bootstrap.Modal
1116 * @extends Roo.bootstrap.Component
1117 * Bootstrap Modal class
1118 * @cfg {String} title Title of dialog
1119 * @cfg {Array} buttons Array of buttons
1122 * Create a new Modal Dialog
1123 * @param {Object} config The config object
1126 Roo.bootstrap.Modal = function(config){
1127 Roo.bootstrap.Modal.superclass.constructor.call(this, config);
1130 Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, {
1132 title : 'test dialog',
1135 onRender : function(ct, position){
1136 Roo.bootstrap.Component.superclass.onRender.call(this, ct, position);
1138 var cfg = Roo.apply({}, this.getAutoCreate());
1141 // cfg.name = typeof(this.name) == 'undefined' ? this.id : this.name;
1143 //if (!cfg.name.length) {
1147 cfg.cls += ' ' + this.cls;
1150 cfg.style = this.style;
1152 this.el = Roo.get(document.body).createChild(cfg, position);
1154 //var type = this.el.dom.type;
1156 if(this.tabIndex !== undefined){
1157 this.el.dom.setAttribute('tabIndex', this.tabIndex);
1160 //this.el.addClass([this.fieldClass, this.cls]);
1163 getAutoCreate : function(){
1169 cls: "modal-dialog",
1172 cls : "modal-content",
1175 cls : 'modal-header',
1184 cls : 'modal-title',
1195 cls : 'modal-footer'
1200 cls : 'btn btn-default',
1205 cls : 'btn btn-primary',
1226 getChildContainer : function() {
1228 return this.el.select('.modal-body',true).first();
1231 getButtonContainer : function() {
1232 return this.el.select('.modal-footer',true).first();
1235 initEvents : function()
1237 this.el.select('.modal-header .close').on('click', this.hide, this);
1240 this.el.addClass('on');
1241 this.el.removeClass('fade');
1242 this.el.setStyle('display', 'block');
1245 this.el.removeClass('on');
1246 this.el.addClass('fade');
1247 this.el.setStyle('display', 'none');
1259 * @class Roo.bootstrap.Navbar
1260 * @extends Roo.bootstrap.Component
1261 * Bootstrap Navbar class
1262 * @cfg {Boolean} sidebar has side bar
1263 * @cfg {Boolean} bar is a bar?
1264 * @cfg {String} position (fixed-top|fixed-bottom|static-top) position
1265 * @cfg {String} brand what is brand
1266 * @cfg {Boolean} inverse is inverted color
1267 * @cfg {String} type (nav|pills|tabs)
1268 * @cfg {Boolean} arrangement stacked|justified
1269 * @cfg {String} align (left|right) alignment
1273 * Create a new Navbar
1274 * @param {Object} config The config object
1278 Roo.bootstrap.Navbar = function(config){
1279 Roo.bootstrap.Navbar.superclass.constructor.call(this, config);
1282 Roo.extend(Roo.bootstrap.Navbar, Roo.bootstrap.Component, {
1294 getAutoCreate : function(){
1299 if (this.sidebar === true) {
1307 if (this.bar === true) {
1315 cls: 'navbar-header',
1320 cls: 'navbar-toggle',
1321 'data-toggle': 'collapse',
1326 html: 'Toggle navigation'
1346 cls: 'collapse navbar-collapse'
1351 cfg.cls += this.inverse ? ' navbar-inverse' : ' navbar-default';
1353 if (['fixed-top','fixed-bottom','static-top'].indexOf(this.position)>-1) {
1354 cfg.cls += ' navbar-' + this.position;
1355 cfg.tag = this.position == 'fixed-bottom' ? 'footer' : 'header';
1358 if (this.brand !== '') {
1362 cls: 'navbar-brand',
1371 } else if (this.bar === false) {
1374 Roo.log('Property \'bar\' in of Navbar must be either true or false')
1384 if (['tabs','pills'].indexOf(this.type)!==-1) {
1385 cfg.cn[0].cls += ' nav-' + this.type
1387 if (this.type!=='nav') {
1388 Roo.log('nav type must be nav/tabs/pills')
1390 cfg.cn[0].cls += ' navbar-nav'
1393 if (['stacked','justified'].indexOf(this.arrangement)!==-1) {
1394 cfg.cn[0].cls += ' nav-' + this.arrangement;
1397 if (this.align === 'right') {
1398 cfg.cn[0].cls += ' navbar-right';
1401 cfg.cls += ' navbar-inverse';
1404 /* type: nav | tabs | pills
1405 * arrangement: stacked | justified
1406 * position: fixed/static etc
1407 * inverse: true/false
1414 getChildContainer : function() {
1415 if (this.bar === true) {
1416 return this.el.select('.collapse',true).first();
1432 Roo.bootstrap.NavGroup = function(config){
1433 Roo.bootstrap.NavGroup.superclass.constructor.call(this, config);
1436 Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component, {
1440 getAutoCreate : function(){
1441 var cfg = Roo.apply({}, Roo.bootstrap.NavGroup.superclass.getAutoCreate.call(this));
1445 cls: 'nav navbar-nav'
1448 if (this.parent().sidebar === true) {
1451 cls: 'dashboard-menu'
1458 if (this.align === 'right') {
1459 cfg.cls += ' navbar-right';
1463 cfg.cls += ' navbar-inverse';
1466 /* type: nav | tabs | pills
1467 * arrangement: stacked | justified
1468 * position: fixed/static etc
1469 * inverse: true/false
1487 * @class Roo.bootstrap.Navbar.Button
1488 * @extends Roo.bootstrap.Component
1489 * Bootstrap Navbar.Button class
1490 * @cfg {String} href link to
1491 * @cfg {String} html content of button
1494 * Create a new Navbar Button
1495 * @param {Object} config The config object
1499 Roo.bootstrap.Navbar.Button = function(config){
1500 Roo.bootstrap.Navbar.Button.superclass.constructor.call(this, config);
1503 Roo.extend(Roo.bootstrap.Navbar.Button, Roo.bootstrap.Component, {
1514 getAutoCreate : function(){
1524 html : this.html || ''
1548 * @class Roo.bootstrap.Navbar.Item
1549 * @extends Roo.bootstrap.Component
1550 * Bootstrap Navbar.Button class
1551 * @cfg {String} href link to
1552 * @cfg {String} html content of button
1553 * @cfg {String} badge text inside badge
1554 * @cfg {String} glyphicon name of glyphicon
1557 * Create a new Navbar Button
1558 * @param {Object} config The config object
1560 Roo.bootstrap.Navbar.Item = function(config){
1561 Roo.bootstrap.Navbar.Item.superclass.constructor.call(this, config);
1564 Roo.extend(Roo.bootstrap.Navbar.Item, Roo.bootstrap.Component, {
1572 getAutoCreate : function(){
1574 var cfg = Roo.apply({}, Roo.bootstrap.Navbar.Item.superclass.getAutoCreate.call(this));
1576 if (this.parent().parent().sidebar === true) {
1589 cfg.cn[0].html = this.html;
1593 this.cls += ' active';
1597 cfg.cn[0].cls += ' dropdown-toggle';
1598 cfg.cn[0].html = (cfg.cn[0].html || this.html) + '<span class="glyphicon glyphicon-chevron-down"></span>';
1602 cfg.cn[0].tag = 'a',
1603 cfg.cn[0].href = this.href;
1606 if (this.glyphicon) {
1607 cfg.cn[0].html = '<i class="glyphicon glyphicon-'+this.glyphicon+'"></i><span>' + cfg.cn[0].html || this.html + '</span>'
1623 if (this.glyphicon) {
1624 if(cfg.html){cfg.html = ' ' + this.html};
1628 cls: 'glyphicon glyphicon-' + this.glyphicon
1633 cfg.cn[0].html = this.html || cfg.cn[0].html ;
1637 cfg.cn[0].html += " <span class='caret'></span>";
1638 //}else if (!this.href) {
1639 // cfg.cn[0].tag='p';
1640 // cfg.cn[0].cls='navbar-text';
1643 cfg.cn[0].href=this.href||'#';
1644 cfg.cn[0].html=this.html;
1647 if (this.badge !== '') {
1650 cfg.cn[0].html + ' ',
1663 initEvents: function() {
1664 // Roo.log('init events?');
1665 // Roo.log(this.el.dom);
1666 this.el.select('a',true).on('click',
1668 this.fireEvent('click', this);
1685 * @class Roo.bootstrap.Row
1686 * @extends Roo.bootstrap.Component
1687 * Bootstrap Row class (contains columns...)
1691 * @param {Object} config The config object
1694 Roo.bootstrap.Row = function(config){
1695 Roo.bootstrap.Row.superclass.constructor.call(this, config);
1698 Roo.extend(Roo.bootstrap.Row, Roo.bootstrap.Component, {
1717 * @class Roo.bootstrap.Column
1718 * @extends Roo.bootstrap.Component
1719 * Bootstrap Column class
1720 * @cfg {number} colspan Number of columsn to span
1723 * Create a new Column
1724 * @param {Object} config The config object
1727 Roo.bootstrap.Element = function(config){
1728 Roo.bootstrap.Element.superclass.constructor.call(this, config);
1731 Roo.extend(Roo.bootstrap.Element, Roo.bootstrap.Component, {
1739 getAutoCreate : function(){
1740 var cfg = Roo.apply({}, Roo.bootstrap.Element.superclass.getAutoCreate.call(this));
1763 * @class Roo.bootstrap.Column
1764 * @extends Roo.bootstrap.Component
1765 * Bootstrap Column class
1766 * @cfg {number} colspan Number of columsn to span
1769 * Create a new Column
1770 * @param {Object} config The config object
1773 Roo.bootstrap.Pagination = function(config){
1774 Roo.bootstrap.Pagination.superclass.constructor.call(this, config);
1777 Roo.extend(Roo.bootstrap.Pagination, Roo.bootstrap.Component, {
1788 getAutoCreate : function(){
1795 cfg.cls += ' inverse';
1813 var from=this.from>0?this.from:1;
1814 var to=this.to-from<=10?this.to:from+10;
1815 var active=this.active>=from&&this.active<=to?this.active:null;
1816 for (var i=from;i<=to;i++) {
1820 cls: active===i?'active':'',
1861 * @class Roo.bootstrap.Container
1862 * @extends Roo.bootstrap.Component
1863 * Bootstrap Container class
1864 * @cfg {Boolean} jumbotron is it a jubmotron element
1865 * @cfg {String} html content of element
1868 * Create a new Container
1869 * @param {Object} config The config object
1872 Roo.bootstrap.Slider = function(config){
1873 Roo.bootstrap.Slider.superclass.constructor.call(this, config);
1876 Roo.extend(Roo.bootstrap.Slider, Roo.bootstrap.Component, {
1878 getAutoCreate : function(){
1882 cls: 'slider slider-sample1 vertical-handler ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all',
1886 cls: 'ui-slider-handle ui-state-default ui-corner-all'
1904 * @class Roo.bootstrap.Column
1905 * @extends Roo.bootstrap.Component
1906 * Bootstrap Column class
1907 * @cfg {number} colspan Number of columsn to span
1910 * Create a new Column
1911 * @param {Object} config The config object
1914 Roo.bootstrap.Table = function(config){
1915 Roo.bootstrap.Table.superclass.constructor.call(this, config);
1918 Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, {
1923 getAutoCreate : function(){
1924 var cfg = Roo.apply({}, Roo.bootstrap.Table.superclass.getAutoCreate.call(this));
1956 * @class Roo.bootstrap.Column
1957 * @extends Roo.bootstrap.Component
1958 * Bootstrap Column class
1959 * @cfg {number} colspan Number of columsn to span
1962 * Create a new Column
1963 * @param {Object} config The config object
1966 Roo.bootstrap.TableCell = function(config){
1967 Roo.bootstrap.TableCell.superclass.constructor.call(this, config);
1970 Roo.extend(Roo.bootstrap.TableCell, Roo.bootstrap.Component, {
1972 getAutoCreate : function(){
1973 var cfg = Roo.apply({}, Roo.bootstrap.TableCell.superclass.getAutoCreate.call(this));
2000 * @class Roo.bootstrap.Column
2001 * @extends Roo.bootstrap.Component
2002 * Bootstrap Column class
2003 * @cfg {number} colspan Number of columsn to span
2006 * Create a new Column
2007 * @param {Object} config The config object
2010 Roo.bootstrap.TableRow = function(config){
2011 Roo.bootstrap.TableRow.superclass.constructor.call(this, config);
2014 Roo.extend(Roo.bootstrap.TableRow, Roo.bootstrap.Component, {
2016 getAutoCreate : function(){
2017 var cfg = Roo.apply({}, Roo.bootstrap.TableRow.superclass.getAutoCreate.call(this));