Roo/bootstrap/Button.js
authorEdward <edward@roojs.com>
Thu, 17 Apr 2014 04:23:18 +0000 (12:23 +0800)
committerEdward <edward@roojs.com>
Thu, 17 Apr 2014 04:23:18 +0000 (12:23 +0800)
Roo/bootstrap/Button.js

index b6453bf..2583888 100644 (file)
@@ -225,6 +225,11 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component,  {
             cfg.html='';
         }
         
+        if (this.menu) {
+            cfg.cls += ' dropdown';
+            cfg.html = this.html  + ' <span class="caret"></span>';
+        }
+        
         if (cfg.tag !== 'a' && this.href !== '') {
             throw "Tag must be a to set href.";
         } else if (this.href.length > 0) {