Roo/bootstrap/ButtonGroup.js
authorJulian Knowles <julian@roojs.com>
Mon, 20 Jan 2014 10:07:01 +0000 (18:07 +0800)
committerJulian Knowles <julian@roojs.com>
Mon, 20 Jan 2014 10:07:01 +0000 (18:07 +0800)
Roo/bootstrap/ButtonGroup.js

index 5f8c37d..eeadb8e 100644 (file)
@@ -28,7 +28,8 @@ Roo.extend(Roo.bootstrap.ButtonGroup, Roo.bootstrap.Component,  {
     
     size: '',
     align: '',
-     direction: '',
+    direction: '',
+    toolbar: false,
     
     autoCreate : {
         cls: 'btn-group',
@@ -41,6 +42,15 @@ Roo.extend(Roo.bootstrap.ButtonGroup, Roo.bootstrap.Component,  {
         
         cfg.html = this.html || cfg.html;
         
+        if (this.toolbar) {
+            cfg = {
+                cls: 'btn-toolbar',
+                html: null
+            }
+            
+            return cfg;
+        }
+        
         if (['vertical','justified'].indexOf(this.align)!==-1) {
             cfg.cls = 'btn-group-' + this.align;