vendor/assets/javascripts/base/_switch.js in active_frontend-14.0.53 vs vendor/assets/javascripts/base/_switch.js in active_frontend-14.0.54

- old
+ new

@@ -82,28 +82,34 @@ if (!silent) this.trigger(); }; Switch.prototype.enable = function () { - this.$switch.removeAttr('disabled'); this.$element.prop('disabled', false); + this.$switch.removeAttr('disabled') + .removeClass('disabled'); }; Switch.prototype.disable = function () { - this.$switch.attr('disabled', 'disabled'); this.$element.prop('disabled', true); + this.$switch.attr('disabled', 'disabled') + .addClass('disabled'); }; Switch.prototype.update = function (silent) { if (this.$element.prop('disabled')) { this.disable(); } else { this.enable(); } if (this.$element.prop('checked')) { + this.$switch + .addClass(this.options.onClass); this.on(silent); } else { + this.$switch + .addClass(this.options.offClass); this.off(silent); } }; Switch.prototype.trigger = function (silent) {