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

index 541f03f..2b20612 100644 (file)
@@ -60,6 +60,21 @@ Roo.extend(Roo.bootstrap.menu.Item, Roo.bootstrap.Component,  {
     
     getAutoCreate : function()
     {
+        var text = [
+            {
+                tag : 'span',
+                cls : 'roo-menu-item-text',
+                html : this.html
+            }
+        ];
+        
+        if(this.icon){
+            text.unshift({
+                tag : 'i',
+                cls : 'fa ' + this.icon
+            })
+        }
+        
         var cfg = {
             tag : 'li',
             cn : [