123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- require({cache:{
- 'url:dijit/form/templates/CheckBox.html':"<div class=\"dijit dijitReset dijitInline\" role=\"presentation\"\n\t><input\n\t \t${!nameAttrSetting} type=\"${type}\" ${checkedAttrSetting}\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdata-dojo-attach-point=\"focusNode\"\n\t \tdata-dojo-attach-event=\"onclick:_onClick\"\n/></div>\n"}});
- define("dijit/form/CheckBox", [
- "require",
- "dojo/_base/declare",
- "dojo/dom-attr",
- "dojo/_base/kernel",
- "dojo/query",
- "dojo/ready",
- "./ToggleButton",
- "./_CheckBoxMixin",
- "dojo/text!./templates/CheckBox.html",
- "dojo/NodeList-dom"
- ], function(require, declare, domAttr, kernel, query, ready, ToggleButton, _CheckBoxMixin, template){
-
-
-
-
-
- if(!kernel.isAsync){
- ready(0, function(){
- var requires = ["dijit/form/RadioButton"];
- require(requires);
- });
- }
- return declare("dijit.form.CheckBox", [ToggleButton, _CheckBoxMixin], {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- templateString: template,
- baseClass: "dijitCheckBox",
- _setValueAttr: function(/*String|Boolean*/ newValue, /*Boolean*/ priorityChange){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(typeof newValue == "string"){
- this._set("value", newValue);
- domAttr.set(this.focusNode, 'value', newValue);
- newValue = true;
- }
- if(this._created){
- this.set('checked', newValue, priorityChange);
- }
- },
- _getValueAttr: function(){
-
-
-
-
-
- return (this.checked ? this.value : false);
- },
-
- _setIconClassAttr: null,
- postMixInProperties: function(){
- this.inherited(arguments);
-
-
-
- this.checkedAttrSetting = this.checked ? "checked" : "";
- },
- _fillContent: function(){
-
-
- },
- _onFocus: function(){
- if(this.id){
- query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");
- }
- this.inherited(arguments);
- },
- _onBlur: function(){
- if(this.id){
- query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");
- }
- this.inherited(arguments);
- }
- });
- });
|