CheckBox.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. //>>built
  2. require({cache:{"url:dijit/form/templates/CheckBox.html":"<div class=\"dijit dijitReset dijitInline\" role=\"presentation\"\n\t><input\n\t \t${!nameAttrSetting} type=\"${type}\" role=\"${type}\" aria-checked=\"false\" ${checkedAttrSetting}\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdata-dojo-attach-point=\"focusNode\"\n\t \tdata-dojo-attach-event=\"ondijitclick:_onClick\"\n/></div>\n"}});
  3. define("dijit/form/CheckBox",["require","dojo/_base/declare","dojo/dom-attr","dojo/has","dojo/query","dojo/ready","./ToggleButton","./_CheckBoxMixin","dojo/text!./templates/CheckBox.html","dojo/NodeList-dom","../a11yclick"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9){
  4. if(_4("dijit-legacy-requires")){
  5. _6(0,function(){
  6. var _a=["dijit/form/RadioButton"];
  7. _1(_a);
  8. });
  9. }
  10. return _2("dijit.form.CheckBox",[_7,_8],{templateString:_9,baseClass:"dijitCheckBox",_setValueAttr:function(_b,_c){
  11. if(typeof _b=="string"){
  12. this.inherited(arguments);
  13. _b=true;
  14. }
  15. if(this._created){
  16. this.set("checked",_b,_c);
  17. }
  18. },_getValueAttr:function(){
  19. return this.checked&&this._get("value");
  20. },_setIconClassAttr:null,_setNameAttr:"focusNode",postMixInProperties:function(){
  21. this.inherited(arguments);
  22. this.checkedAttrSetting="";
  23. },_fillContent:function(){
  24. },_onFocus:function(){
  25. if(this.id){
  26. _5("label[for='"+this.id+"']").addClass("dijitFocusedLabel");
  27. }
  28. this.inherited(arguments);
  29. },_onBlur:function(){
  30. if(this.id){
  31. _5("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");
  32. }
  33. this.inherited(arguments);
  34. }});
  35. });