Update bootstrap-switch to 3.3.2

This commit is contained in:
Daniel Berteaud 2015-02-20 10:38:58 +01:00
parent 7614232561
commit b81bd7873a
4 changed files with 33 additions and 20 deletions

View File

@ -1,5 +1,5 @@
/* ========================================================================
* bootstrap-switch - v3.3.1
* bootstrap-switch - v3.3.2
* http://www.bootstrap-switch.org
* ========================================================================
* Copyright 2012-2013 Mattia Larentis
@ -30,6 +30,7 @@
text-align: left;
overflow: hidden;
line-height: 8px;
z-index: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/* ========================================================================
* bootstrap-switch - v3.3.1
* bootstrap-switch - v3.3.2
* http://www.bootstrap-switch.org
* ========================================================================
* Copyright 2012-2013 Mattia Larentis
@ -27,7 +27,6 @@
var BootstrapSwitch;
BootstrapSwitch = (function() {
function BootstrapSwitch(element, options) {
var initInterval;
if (options == null) {
options = {};
}
@ -110,19 +109,7 @@
if (this.options.indeterminate) {
this.$element.prop("indeterminate", true);
}
initInterval = window.setInterval((function(_this) {
return function() {
if (_this.$wrapper.is(":visible")) {
_this._width();
_this._containerPosition(null, function() {
if (_this.options.animate) {
return _this.$wrapper.addClass("" + _this.options.baseClass + "-animate");
}
});
return window.clearInterval(initInterval);
}
};
})(this), 50);
this._init();
this._elementHandlers();
this._handleHandlers();
this._labelHandlers();
@ -475,6 +462,31 @@
}, 50);
};
BootstrapSwitch.prototype._init = function() {
var init, initInterval;
init = (function(_this) {
return function() {
_this._width();
return _this._containerPosition(null, function() {
if (_this.options.animate) {
return _this.$wrapper.addClass("" + _this.options.baseClass + "-animate");
}
});
};
})(this);
if (this.$wrapper.is(":visible")) {
return init();
}
return initInterval = window.setInterval((function(_this) {
return function() {
if (_this.$wrapper.is(":visible")) {
init();
return window.clearInterval(initInterval);
}
};
})(this), 50);
};
BootstrapSwitch.prototype._elementHandlers = function() {
return this.$element.on({
"change.bootstrapSwitch": (function(_this) {

File diff suppressed because one or more lines are too long