X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-bootstrap-debug.js;h=fd415b77e2b708d56310395bf2e1cf8032ccbcd1;hb=74635ad8eb9b44610bb2c0edc7bc963a3a811150;hp=5f023177fa1c415e895b2c084fc72c71e048c952;hpb=2457b737b711bf14a77c709b3b949c8cee145195;p=roojs1
diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js
index 5f023177fa..fd415b77e2 100644
--- a/roojs-bootstrap-debug.js
+++ b/roojs-bootstrap-debug.js
@@ -4615,6 +4615,8 @@ Roo.apply(Roo.bootstrap.NavGroup, {
* @extends Roo.bootstrap.Component
* Bootstrap Navbar.NavItem class
* @cfg {String} href link to
+ * @cfg {String} button_weight (default | primary | secondary | success | info | warning | danger | link ) default none
+
* @cfg {String} html content of button
* @cfg {String} badge text inside badge
* @cfg {String} badgecls (bg-green|bg-red|bg-yellow)the extra classes for the badge
@@ -4680,6 +4682,8 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component, {
disabled : false,
animateRef : false,
was_active : false,
+ button_weight : '',
+ button_outline : false,
navLink: false,
@@ -4688,7 +4692,6 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component, {
var cfg = {
tag: this.tag,
cls: 'nav-item'
-
};
if (this.active) {
@@ -4697,6 +4700,27 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component, {
if (this.disabled) {
cfg.cls += ' disabled';
}
+
+ // BS4 only?
+ if (this.button_weight.length) {
+ cfg.tag = this.href ? 'a' : 'button';
+ cfg.html = this.html || '';
+ cfg.cls += ' btn' + (this.btn_outline ? '-outline' : '') + this.button_weight;
+ if (this.href) {
+ cfg.href = this.href;
+ }
+ if (this.fa) {
+ cfg.html = ' ' + this.html + '';
+ }
+
+ // menu .. should add dropdown-menu class - so no need for carat..
+
+ if (this.badge !== '') {
+
+ cfg.html += ' ' + this.badge + '';
+ }
+ return cfg;
+ }
if (this.href || this.html || this.glyphicon || this.icon || this.fa) {
cfg.cn = [
@@ -4710,10 +4734,10 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component, {
cfg.cn[0].cls = 'nav-link';
}
if (this.icon) {
- cfg.cn[0].html = ' ' + cfg.cn[0].html + ''
+ cfg.cn[0].html = ' ' + cfg.cn[0].html + '';
}
if (this.fa) {
- cfg.cn[0].html = ' ' + cfg.cn[0].html + ''
+ cfg.cn[0].html = ' ' + cfg.cn[0].html + '';
}
if(this.glyphicon) {
cfg.cn[0].html = ' ' + cfg.cn[0].html;