Roo/bootstrap/Navbar.Item.js
authorJulian Knowles <julian@roojs.com>
Wed, 22 Jan 2014 08:56:24 +0000 (16:56 +0800)
committerJulian Knowles <julian@roojs.com>
Wed, 22 Jan 2014 08:56:24 +0000 (16:56 +0800)
Roo/bootstrap/Navbar.Item.js

index cae4eea..22f0628 100644 (file)
@@ -27,6 +27,17 @@ Roo.extend(Roo.bootstrap.Navbar.Item, Roo.bootstrap.Component,  {
                html: 'Text'
             }
         ];
+        
+        if (this.glyphicon) {
+            if(cfg.html){cfg.html = ' ' + cfg.html};
+            cfg.cn=cfg.cn||[]
+            cfg.cn.unshift(
+                {
+                    tag: 'span',
+                    cls: 'glyphicon glyphicon-' + this.glyphicon
+                }
+            );
+        }
        
         cfg.cn[0].html = this.html || cfg.cn[0].html ;
        if (this.menu) {
@@ -41,17 +52,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 = ' ' + cfg.html};
-            cfg.cn=cfg.cn||[]
-            cfg.cn.unshift(
-                {
-                    tag: 'span',
-                    cls: 'glyphicon glyphicon-' + this.glyphicon
-                }
-            );
-        }
        
        if (this.badge !== '') {