vendor/assets/javascripts/base/_switch.js in active_frontend-15.0.21 vs vendor/assets/javascripts/base/_switch.js in active_frontend-15.0.22
- old
+ new
@@ -78,10 +78,11 @@
this.$element.prop('checked', true)
.attr('checked', 'checked');
if (!silent) this.trigger();
+ $.event.trigger('switchOnOn');
this.options.onOnCallback();
};
Switch.prototype.off = function (silent) {
if (this.$element.prop('disabled')) return false;
@@ -92,9 +93,10 @@
this.$element.prop('checked', false)
.removeAttr('checked');
if (!silent) this.trigger();
+ $.event.trigger('switchOnOff');
this.options.onOffCallback();
};
Switch.prototype.enable = function () {
this.$element.prop('disabled', false);