Fix broken checkbox caused by 54314

This commit is contained in:
Hadi Nategh 2015-11-19 09:03:10 +00:00
parent 174a63f86f
commit a74e79becc

View File

@ -139,8 +139,8 @@ var et2_checkbox = et2_inputWidget.extend(
if(_value == this.options.selected_value || if(_value == this.options.selected_value ||
_value && this.options.selected_value == this.attributes.selected_value["default"] && _value && this.options.selected_value == this.attributes.selected_value["default"] &&
_value != this.options.unselected_value) { _value != this.options.unselected_value) {
if (this.options.toggle_on || this.options.toggle_off) this.input.prop("checked", true); if (this.options.toggle_on || this.options.toggle_off) this.toggle.addClass('switchOn');
this.toggle.addClass('switchOn'); this.input.prop("checked", true);
} else { } else {
this.input.prop("checked", false); this.input.prop("checked", false);
if (this.options.toggle_on || this.options.toggle_off) this.toggle.removeClass('switchOn'); if (this.options.toggle_on || this.options.toggle_off) this.toggle.removeClass('switchOn');