| 1 |
define([ |
| 2 |
"dojo/_base/declare", |
| 3 |
"dojo/sniff", |
| 4 |
"dojo/_base/kernel", |
| 5 |
"dojo/ready", |
| 6 |
"../_Widget", |
| 7 |
"../_CssStateMixin", |
| 8 |
"../_TemplatedMixin", |
| 9 |
"./_FormWidgetMixin" |
| 10 |
], function(declare, has, kernel, ready, _Widget, _CssStateMixin, _TemplatedMixin, _FormWidgetMixin){ |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
if(has("dijit-legacy-requires")){ |
| 17 |
ready(0, function(){ |
| 18 |
var requires = ["dijit/form/_FormValueWidget"]; |
| 19 |
require(requires); |
| 20 |
}); |
| 21 |
} |
| 22 |
|
| 23 |
return declare("dijit.form._FormWidget", [_Widget, _TemplatedMixin, _CssStateMixin, _FormWidgetMixin], { |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
setDisabled: function( disabled){ |
| 36 |
|
| 37 |
|
| 38 |
kernel.deprecated("setDisabled(" + disabled + ") is deprecated. Use set('disabled'," + disabled + ") instead.", "", "2.0"); |
| 39 |
this.set('disabled', disabled); |
| 40 |
}, |
| 41 |
|
| 42 |
setValue: function( value){ |
| 43 |
|
| 44 |
|
| 45 |
kernel.deprecated("dijit.form._FormWidget:setValue(" + value + ") is deprecated. Use set('value'," + value + ") instead.", "", "2.0"); |
| 46 |
this.set('value', value); |
| 47 |
}, |
| 48 |
|
| 49 |
getValue: function(){ |
| 50 |
|
| 51 |
|
| 52 |
kernel.deprecated(this.declaredClass + "::getValue() is deprecated. Use get('value') instead.", "", "2.0"); |
| 53 |
return this.get('value'); |
| 54 |
}, |
| 55 |
|
| 56 |
postMixInProperties: function(){ |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
this.nameAttrSetting = (this.name && !has("msapp")) ? ('name="' + this.name.replace(/"/g, """) + '"') : ''; |
| 64 |
this.inherited(arguments); |
| 65 |
} |
| 66 |
}); |
| 67 |
}); |