/* Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ dojo._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dijit.form.CheckBox"],["require","dijit.form.ToggleButton"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dijit.form.CheckBox"]){_4._hasResource["dijit.form.CheckBox"]=true;_4.provide("dijit.form.CheckBox");_4.require("dijit.form.ToggleButton");_4.declare("dijit.form.CheckBox",_5.form.ToggleButton,{templateString:_4.cache("dijit.form","templates/CheckBox.html","
\n"),baseClass:"dijitCheckBox",type:"checkbox",value:"on",readOnly:false,attributeMap:_4.delegate(_5.form._FormWidget.prototype.attributeMap,{readOnly:"focusNode"}),_setReadOnlyAttr:function(_7){this.readOnly=_7;_4.attr(this.focusNode,"readOnly",_7);_5.setWaiState(this.focusNode,"readonly",_7);},_setValueAttr:function(_8,_9){if(typeof _8=="string"){this.value=_8;_4.attr(this.focusNode,"value",_8);_8=true;}if(this._created){this.set("checked",_8,_9);}},_getValueAttr:function(){return (this.checked?this.value:false);},_setLabelAttr:undefined,postMixInProperties:function(){if(this.value==""){this.value="on";}this.checkedAttrSetting=this.checked?"checked":"";this.inherited(arguments);},_fillContent:function(_a){},reset:function(){this._hasBeenBlurred=false;this.set("checked",this.params.checked||false);this.value=this.params.value||"on";_4.attr(this.focusNode,"value",this.value);},_onFocus:function(){if(this.id){_4.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");}this.inherited(arguments);},_onBlur:function(){if(this.id){_4.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");}this.inherited(arguments);},_onClick:function(e){if(this.readOnly){return false;}return this.inherited(arguments);}});_4.declare("dijit.form.RadioButton",_5.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_setCheckedAttr:function(_b){this.inherited(arguments);if(!this._created){return;}if(_b){var _c=this;_4.query("INPUT[type=radio]",this.focusNode.form||_4.doc).forEach(function(_d){if(_d.name==_c.name&&_d!=_c.focusNode&&_d.form==_c.focusNode.form){var _e=_5.getEnclosingWidget(_d);if(_e&&_e.checked){_e.set("checked",false);}}});}},_clicked:function(e){if(!this.checked){this.set("checked",true);}}});}}};});