Skip to content

Commit

Permalink
オリジナルの開発が止まっているため、以下のPull Requestをマージ、ビルドして利用する。
Browse files Browse the repository at this point in the history
  • Loading branch information
izumiya committed Apr 17, 2023
1 parent ddbdecb commit a107a5b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dist/css/bootstrap2/bootstrap-switch.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
*
* @version v3.3.5
* @version v3.4.0
* @homepage https://bttstrp.github.io/bootstrap-switch
* @author Mattia Larentis <[email protected]> (http:https://larentis.eu)
* @license MIT
Expand Down
4 changes: 2 additions & 2 deletions dist/css/bootstrap2/bootstrap-switch.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/bootstrap3/bootstrap-switch.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
*
* @version v3.3.5
* @version v3.4.0
* @homepage https://bttstrp.github.io/bootstrap-switch
* @author Mattia Larentis <[email protected]> (http:https://larentis.eu)
* @license MIT
Expand Down
2 changes: 1 addition & 1 deletion dist/css/bootstrap3/bootstrap-switch.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions dist/js/bootstrap-switch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
*
* @version v3.3.5
* @version v3.4.0
* @homepage https://bttstrp.github.io/bootstrap-switch
* @author Mattia Larentis <[email protected]> (http:https://larentis.eu)
* @license MIT
Expand Down Expand Up @@ -79,7 +79,7 @@
inverse = options.inverse;

return [state ? 'on' : 'off', size, disabled ? 'disabled' : undefined, readonly ? 'readonly' : undefined, indeterminate ? 'indeterminate' : undefined, inverse ? 'inverse' : undefined, id ? 'id-' + id : undefined].filter(function (v) {
return v == null;
return v != null;
});
}

Expand Down Expand Up @@ -129,7 +129,7 @@
function prvcontainerPosition() {
var _this2 = this;

var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.ope;
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.state;

this.$container.css('margin-left', function () {
var values = [0, '-' + _this2.privateHandleWidth + 'px'];
Expand Down Expand Up @@ -345,7 +345,7 @@
function prvgetClasses(classes) {
var _this8 = this;

if (!$.isArray(classes)) {
if (!Array.isArray(classes)) {
return [prvgetClass.call(this, classes)];
}
return classes.map(function (v) {
Expand Down Expand Up @@ -373,15 +373,15 @@
});
this.$container = $('<div>', { class: prvgetClass.call(this, 'container') });
this.$on = $('<span>', {
html: this.options.onText,
text: this.options.onText,
class: prvgetClass.call(this, 'handle-on') + ' ' + prvgetClass.call(this, this.options.onColor)
});
this.$off = $('<span>', {
html: this.options.offText,
text: this.options.offText,
class: prvgetClass.call(this, 'handle-off') + ' ' + prvgetClass.call(this, this.options.offColor)
});
this.$label = $('<span>', {
html: this.options.labelText,
text: this.options.labelText,
class: prvgetClass.call(this, 'label')
});

Expand Down Expand Up @@ -606,7 +606,7 @@
if (typeof value === 'undefined') {
return this.options.onText;
}
this.$on.html(value);
this.$on.text(value);
prvwidth.call(this);
prvcontainerPosition.call(this);
this.options.onText = value;
Expand All @@ -618,7 +618,7 @@
if (typeof value === 'undefined') {
return this.options.offText;
}
this.$off.html(value);
this.$off.text(value);
prvwidth.call(this);
prvcontainerPosition.call(this);
this.options.offText = value;
Expand All @@ -630,7 +630,7 @@
if (typeof value === 'undefined') {
return this.options.labelText;
}
this.$label.html(value);
this.$label.text(value);
prvwidth.call(this);
this.options.labelText = value;
return this.$element;
Expand Down Expand Up @@ -756,7 +756,7 @@
offColor: 'default',
onText: 'ON',
offText: 'OFF',
labelText: '&nbsp',
labelText: '\xa0',
handleWidth: 'auto',
labelWidth: 'auto',
baseClass: 'bootstrap-switch',
Expand Down
4 changes: 2 additions & 2 deletions dist/js/bootstrap-switch.min.js

Large diffs are not rendered by default.

0 comments on commit a107a5b

Please sign in to comment.