projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a66da26
)
Roo/bootstrap/NavItem.js
author
Alan Knowles
<alan@roojs.com>
Thu, 28 Jan 2021 08:53:33 +0000
(16:53 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 28 Jan 2021 08:53:33 +0000
(16:53 +0800)
Roo/bootstrap/NavItem.js
patch
|
blob
|
history
diff --git
a/Roo/bootstrap/NavItem.js
b/Roo/bootstrap/NavItem.js
index
9491b33
..
5e0757b
100644
(file)
--- a/
Roo/bootstrap/NavItem.js
+++ b/
Roo/bootstrap/NavItem.js
@@
-89,8
+89,10
@@
Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component, {
cls: 'nav-item'
};
cls: 'nav-item'
};
+ cfg.cls = typeof(cfg.cls) == 'undefined' ? '' : cfg.cls;
+
if (this.active) {
if (this.active) {
- cfg.cls
= typeof(cfg.cls) == 'undefined' ? 'active' : cfg.cls + ' active'
;
+ cfg.cls
+= ' active'
;
}
if (this.disabled) {
cfg.cls += ' disabled';
}
if (this.disabled) {
cfg.cls += ' disabled';
@@
-126,7
+128,8
@@
Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component, {
}
];
if (this.tagtype == 'a') {
}
];
if (this.tagtype == 'a') {
- cfg.cn[0].cls = 'nav-link';
+ cfg.cn[0].cls = 'nav-link' + (this.active ? ' active' : '');
+
}
if (this.icon) {
cfg.cn[0].html = '<i class="'+this.icon+'"></i> <span>' + cfg.cn[0].html + '</span>';
}
if (this.icon) {
cfg.cn[0].html = '<i class="'+this.icon+'"></i> <span>' + cfg.cn[0].html + '</span>';