Fix default true/false

This commit is contained in:
Nathan Gray 2012-06-19 21:47:52 +00:00
parent e41e681354
commit 41f663407c

View File

@ -60,7 +60,6 @@ var et2_checkbox = et2_inputWidget.extend({
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.input = null; this.input = null;
this.id = "";
this.createInputWidget(); this.createInputWidget();
@ -80,7 +79,8 @@ var et2_checkbox = et2_inputWidget.extend({
set_value: function(_value) { set_value: function(_value) {
if(_value != this.value) { if(_value != this.value) {
if(_value == this.options.selected_value || if(_value == this.options.selected_value ||
_value && this.options.selected_value == this.__proto__.attributes.selected_value["default"]) { _value && this.options.selected_value == this.__proto__.attributes.selected_value["default"] &&
_value != this.options.unselected_value) {
this.input.attr("checked", "checked"); this.input.attr("checked", "checked");
} else { } else {
this.input.removeAttr("checked"); this.input.removeAttr("checked");