Update for attributes moved to options sub-property

This commit is contained in:
Nathan Gray 2011-10-03 17:50:29 +00:00
parent 4c593038b0
commit 99cad7bd37

View File

@ -73,7 +73,7 @@ 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.selected_value) { if(_value == this.options.selected_value) {
this.input.attr("checked", "checked"); this.input.attr("checked", "checked");
} else { } else {
this.input.removeAttr("checked"); this.input.removeAttr("checked");
@ -86,9 +86,9 @@ var et2_checkbox = et2_inputWidget.extend({
*/ */
getValue: function() { getValue: function() {
if(this.input.attr("checked")) { if(this.input.attr("checked")) {
return this.selected_value; return this.options.selected_value;
} else { } else {
return this.unselected_value; return this.options.unselected_value;
} }
} }
}); });
@ -120,11 +120,11 @@ var et2_checkbox_ro = et2_checkbox.extend({
}, },
set_value: function(_value) { set_value: function(_value) {
if(_value == this.selected_value) { if(_value == this.options.selected_value) {
this.span.text(this.ro_true); this.span.text(this.options.ro_true);
this.value = _value; this.value = _value;
} else { } else {
this.span.text(this.ro_false); this.span.text(this.options.ro_false);
} }
} }