projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ae72e72
)
Roo/bootstrap/Button.js
author
Alan Knowles
<alan@roojs.com>
Thu, 29 Nov 2018 04:15:27 +0000
(12:15 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 29 Nov 2018 04:15:27 +0000
(12:15 +0800)
Roo/bootstrap/Button.js
patch
|
blob
|
history
diff --git
a/Roo/bootstrap/Button.js
b/Roo/bootstrap/Button.js
index
86b6244
..
8fb44dd
100644
(file)
--- a/
Roo/bootstrap/Button.js
+++ b/
Roo/bootstrap/Button.js
@@
-78,6
+78,7
@@
Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, {
disabled: false,
isClose: false,
glyphicon: '',
disabled: false,
isClose: false,
glyphicon: '',
+ fa: '',
badge: '',
theme: 'default',
inverse: false,
badge: '',
theme: 'default',
inverse: false,
@@
-188,6
+189,10
@@
Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, {
Roo.log('changing to ul' );
cfg.tag = 'ul';
this.glyphicon = 'caret';
Roo.log('changing to ul' );
cfg.tag = 'ul';
this.glyphicon = 'caret';
+ if (Roo.bootstrap.version == 4) {
+ this.fa = 'caret-down';
+ }
+
}
cfg.cls += this.size.length ? (' btn-' + this.size) : '';
}
cfg.cls += this.size.length ? (' btn-' + this.size) : '';
@@
-226,6
+231,16
@@
Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, {
}
];
}
}
];
}
+ if (this.fa) {
+ cfg.html = ' ' + cfg.html;
+
+ cfg.cn = [
+ {
+ tag: 'i',
+ cls: 'fa fa-' + this.fa
+ }
+ ];
+ }
if (this.badge) {
cfg.html += ' ';
if (this.badge) {
cfg.html += ' ';