Skip to content

Commit a107a5b

Browse files
committed
オリジナルの開発が止まっているため、以下のPull Requestをマージ、ビルドして利用する。
- Bttstrp#713 - Bttstrp#730
1 parent ddbdecb commit a107a5b

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

dist/css/bootstrap2/bootstrap-switch.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
33
*
4-
* @version v3.3.5
4+
* @version v3.4.0
55
* @homepage https://bttstrp.github.io/bootstrap-switch
66
* @author Mattia Larentis <[email protected]> (http://larentis.eu)
77
* @license MIT

dist/css/bootstrap2/bootstrap-switch.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/bootstrap3/bootstrap-switch.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
33
*
4-
* @version v3.3.5
4+
* @version v3.4.0
55
* @homepage https://bttstrp.github.io/bootstrap-switch
66
* @author Mattia Larentis <[email protected]> (http://larentis.eu)
77
* @license MIT

dist/css/bootstrap3/bootstrap-switch.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/bootstrap-switch.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
33
*
4-
* @version v3.3.5
4+
* @version v3.4.0
55
* @homepage https://bttstrp.github.io/bootstrap-switch
66
* @author Mattia Larentis <[email protected]> (http://larentis.eu)
77
* @license MIT
@@ -79,7 +79,7 @@
7979
inverse = options.inverse;
8080

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

@@ -129,7 +129,7 @@
129129
function prvcontainerPosition() {
130130
var _this2 = this;
131131

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

134134
this.$container.css('margin-left', function () {
135135
var values = [0, '-' + _this2.privateHandleWidth + 'px'];
@@ -345,7 +345,7 @@
345345
function prvgetClasses(classes) {
346346
var _this8 = this;
347347

348-
if (!$.isArray(classes)) {
348+
if (!Array.isArray(classes)) {
349349
return [prvgetClass.call(this, classes)];
350350
}
351351
return classes.map(function (v) {
@@ -373,15 +373,15 @@
373373
});
374374
this.$container = $('<div>', { class: prvgetClass.call(this, 'container') });
375375
this.$on = $('<span>', {
376-
html: this.options.onText,
376+
text: this.options.onText,
377377
class: prvgetClass.call(this, 'handle-on') + ' ' + prvgetClass.call(this, this.options.onColor)
378378
});
379379
this.$off = $('<span>', {
380-
html: this.options.offText,
380+
text: this.options.offText,
381381
class: prvgetClass.call(this, 'handle-off') + ' ' + prvgetClass.call(this, this.options.offColor)
382382
});
383383
this.$label = $('<span>', {
384-
html: this.options.labelText,
384+
text: this.options.labelText,
385385
class: prvgetClass.call(this, 'label')
386386
});
387387

@@ -606,7 +606,7 @@
606606
if (typeof value === 'undefined') {
607607
return this.options.onText;
608608
}
609-
this.$on.html(value);
609+
this.$on.text(value);
610610
prvwidth.call(this);
611611
prvcontainerPosition.call(this);
612612
this.options.onText = value;
@@ -618,7 +618,7 @@
618618
if (typeof value === 'undefined') {
619619
return this.options.offText;
620620
}
621-
this.$off.html(value);
621+
this.$off.text(value);
622622
prvwidth.call(this);
623623
prvcontainerPosition.call(this);
624624
this.options.offText = value;
@@ -630,7 +630,7 @@
630630
if (typeof value === 'undefined') {
631631
return this.options.labelText;
632632
}
633-
this.$label.html(value);
633+
this.$label.text(value);
634634
prvwidth.call(this);
635635
this.options.labelText = value;
636636
return this.$element;
@@ -756,7 +756,7 @@
756756
offColor: 'default',
757757
onText: 'ON',
758758
offText: 'OFF',
759-
labelText: '&nbsp',
759+
labelText: '\xa0',
760760
handleWidth: 'auto',
761761
labelWidth: 'auto',
762762
baseClass: 'bootstrap-switch',

dist/js/bootstrap-switch.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)