Roo/bootstrap/Navbar.Item.js
authorJulian Knowles <julian@roojs.com>
Wed, 22 Jan 2014 09:00:25 +0000 (17:00 +0800)
committerJulian Knowles <julian@roojs.com>
Wed, 22 Jan 2014 09:00:25 +0000 (17:00 +0800)
Roo/bootstrap/Navbar.Item.js

index bb6dd70..1a4d8bb 100644 (file)
@@ -27,6 +27,16 @@ Roo.extend(Roo.bootstrap.Navbar.Item, Roo.bootstrap.Component,  {
                html: 'Text'
             }
         ];
+        
+        if (this.glyphicon) {
+            if(cfg.html){cfg.html = ' ' + this.html};
+            cfg.cn=[
+                {
+                    tag: 'span',
+                    cls: 'glyphicon glyphicon-' + this.glyphicon
+                }
+            ];
+        }
        
         cfg.cn[0].html = this.html || cfg.cn[0].html ;
        if (this.menu) {
@@ -41,16 +51,6 @@ Roo.extend(Roo.bootstrap.Navbar.Item, Roo.bootstrap.Component,  {
            cfg.cn[0].href=this.href||'#';
            cfg.cn[0].html=this.html;
        }
-        
-        if (this.glyphicon) {
-            if(cfg.html){cfg.html = ' ' + this.html};
-            cfg.cn=[
-                {
-                    tag: 'span',
-                    cls: 'glyphicon glyphicon-' + this.glyphicon
-                }
-            ];
-        }
        
        if (this.badge !== '') {