Roo/bootstrap/menu/Menu.js
authorEdward <edward@roojs.com>
Fri, 5 Dec 2014 04:09:03 +0000 (12:09 +0800)
committerEdward <edward@roojs.com>
Fri, 5 Dec 2014 04:09:03 +0000 (12:09 +0800)
Roo/bootstrap/menu/Menu.js

index 06ec708..aeac64d 100644 (file)
@@ -78,11 +78,7 @@ Roo.extend(Roo.bootstrap.menu.Menu, Roo.bootstrap.Component,  {
     
     getAutoCreate : function()
     {
-        var text = [
-            {
-                tag : 'i',
-                cls : 'fa fa-search'
-            },
+        var btn = [
             {
                 tag : 'span',
                 cls : 'roo-button-text',
@@ -90,6 +86,13 @@ Roo.extend(Roo.bootstrap.menu.Menu, Roo.bootstrap.Component,  {
             }
         ];
         
+        if(this.icon){
+            btn.unshift({
+                tag : 'i',
+                cls : 'fa ' + this.icon
+            })
+        }
+        
         
         var cfg = {
             tag : 'div',
@@ -98,7 +101,7 @@ Roo.extend(Roo.bootstrap.menu.Menu, Roo.bootstrap.Component,  {
                 {
                     tag : 'button',
                     cls : 'dropdown-button btn btn-' + this.weight,
-                    cn : text
+                    cn : btn
                 },
                 {
                     tag : 'button',