Index: dojo-release-1.3.2-src/dijit/form/CheckBox.js
===================================================================
--- dojo-release-1.3.2-src.orig/dijit/form/CheckBox.js 2009-09-16 15:32:03.000000000 -0700
+++ dojo-release-1.3.2-src/dijit/form/CheckBox.js 2009-11-02 14:31:52.984375000 -0800
@@ -74,6 +74,23 @@
return (this.checked ? this.value : false);
},
+ _setResetValueAttr: function(/*anything*/ newValue){
+ // summary:
+ // Hook so attr('resetValue', value) works.
+ // description:
+ // Sets the resetValue of the widget.
+ this.params.checked = newValue;
+ if(this._created){
+ this.attr('checked', newValue);
+ }
+ },
+
+ _getResetValueAttr: function(){
+ // summary:
+ // Hook so attr('resetValue') works.
+ return this.params.checked || false;
+ },
+
postMixInProperties: function(){
if(this.value == ""){
this.value = "on";
Index: dojo-release-1.3.2-src/dijit/form/_FormWidget.js
===================================================================
--- dojo-release-1.3.2-src.orig/dijit/form/_FormWidget.js 2009-09-16 15:32:03.000000000 -0700
+++ dojo-release-1.3.2-src/dijit/form/_FormWidget.js 2009-11-11 14:01:20.906250000 -0800
@@ -299,7 +299,7 @@
// and is used to store away the original value (or for ToggleButton, the original checked state)
this._resetValue = this._lastValueReported = newValue;
}
- if((this.intermediateChanges || priorityChange || priorityChange === undefined) &&
+ if((priorityChange || priorityChange === undefined) &&
((typeof newValue != typeof this._lastValueReported) ||
this.compare(newValue, this._lastValueReported) != 0)){
this._lastValueReported = newValue;
@@ -397,6 +397,23 @@
return this._lastValue;
},
+ _setResetValueAttr: function(/*anything*/ newValue, /*Boolean, optional*/ priorityChange){
+ // summary:
+ // Hook so attr('resetValue', value) works.
+ // description:
+ // Sets the resetValue and value of the widget.
+ // If the value has changed, then fire onChange event, unless priorityChange
+ // is specified as null (or false?)
+ this._resetValue = newValue;
+ this.attr('value',newValue,priorityChange);
+ },
+
+ _getResetValueAttr: function(/*String*/ value){
+ // summary:
+ // Hook so attr('resetValue') works.
+ return this._resetValue;
+ },
+
undo: function(){
// summary:
// Restore the value to the last value passed to onChange