12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- define("dijit/form/_CheckBoxMixin", [
- "dojo/_base/declare",
- "dojo/dom-attr",
- "dojo/_base/event"
- ], function(declare, domAttr, event){
-
-
-
-
- return declare("dijit.form._CheckBoxMixin", null, {
-
-
-
-
-
-
-
-
-
-
-
-
- type: "checkbox",
-
-
-
- value: "on",
-
-
-
-
- readOnly: false,
-
-
- _aria_attr: "aria-checked",
- _setReadOnlyAttr: function(/*Boolean*/ value){
- this._set("readOnly", value);
- domAttr.set(this.focusNode, 'readOnly', value);
- },
-
-
- _setLabelAttr: undefined,
- postMixInProperties: function(){
- if(this.value == ""){
- this.value = "on";
- }
- this.inherited(arguments);
- },
- reset: function(){
- this.inherited(arguments);
-
- this._set("value", this.params.value || "on");
- domAttr.set(this.focusNode, 'value', this.value);
- },
- _onClick: function(/*Event*/ e){
-
-
-
- if(this.readOnly){
- event.stop(e);
- return false;
- }
- return this.inherited(arguments);
- }
- });
- });
|