X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=docs%2Fsrc%2FRoo_bootstrap_Button.js.html;fp=docs%2Fsrc%2FRoo_bootstrap_Button.js.html;h=9b0189c81d29cd7b5455c6464f2251c4a3eade7c;hp=0ca37a4517412cdc43c49442b7bf7288026ee505;hb=bc3e215d70dea4848adb3e9dc56cca48b8a76422;hpb=9b0f74a5b20b5ab11c6d58a49a48d3dd1216fb9b
diff --git a/docs/src/Roo_bootstrap_Button.js.html b/docs/src/Roo_bootstrap_Button.js.html
index 0ca37a4517..9b0189c81d 100644
--- a/docs/src/Roo_bootstrap_Button.js.html
+++ b/docs/src/Roo_bootstrap_Button.js.html
@@ -119,9 +119,9 @@
}
]
};
-
- if (['default', 'secondary' , 'primary', 'success', 'info', 'warning', 'danger', 'link'].indexOf(this.weight) > -1) {
- cfg.cls += ' '+this.weight;
+ if (Roo.bootstrap.Button.weights.indexOf(this.weight) > -1) {
+ cfg.cls += ' ' + this.weight;
}
return cfg;
@@ -144,7 +144,7 @@
this.weight = this.weight.length ? this.weight : 'default';
if (['default', 'primary', 'secondary', 'success', 'info', 'warning', 'danger', 'link'].indexOf(this.weight) > -1) {
+ if (Roo.bootstrap.Button.weights.indexOf(this.weight) > -1) {
var outline = this.outline || this.weight == 'default' ? 'outline-' : '';
var weight = this.weight == 'default' ? 'secondary' : this.weight;
@@ -159,7 +159,7 @@
cfg.tag = 'a';
cfg.cls = 'btn-glow roo-button';
- if (['default', 'primary', 'success', 'info', 'warning', 'danger', 'link'].indexOf(this.weight) > -1) {
+ if (Roo.bootstrap.Button.weights.indexOf(this.weight) > -1) {
cfg.cls += ' ' + this.weight;
}
@@ -403,7 +403,8 @@
setWeight : function(str)
{
- this.el.removeClass(Roo.bootstrap.Button.weightClass );
+ this.el.removeClass(Roo.bootstrap.Button.weights.map(function(w) { return 'btn-' + w; } ) );
+ this.el.removeClass(Roo.bootstrap.Button.weights.map(function(w) { return 'btn-outline-' + w; } ) );
this.weight = str;
var outline = this.outline ? 'outline-' : '';
if (str == 'default') {
@@ -415,18 +416,18 @@
});
-Roo.bootstrap.Button.weightClass = [
-
- "btn-default",
- "btn-outline-secondary",
- "btn-secondary",
- "btn-primary",
- "btn-success",
- "btn-info",
- "btn-warning",
- "btn-danger",
- "btn-link",
- 'btn-light',
- 'btn-dark'
-];