diff options
author | Andrew Dolgov <[email protected]> | 2012-08-14 18:59:10 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-08-14 18:59:18 +0400 |
commit | 1354d17270961fff662d40f90521223f8fd0d73b (patch) | |
tree | e9266be71587e47c800303446e968a6d3565e2cf /lib/dijit/form/_FormWidget.js.uncompressed.js | |
parent | d04f8c826f5283765f52cf6b98b42a1ed8f2d6bc (diff) |
update dojo to 1.7.3
Diffstat (limited to 'lib/dijit/form/_FormWidget.js.uncompressed.js')
-rw-r--r-- | lib/dijit/form/_FormWidget.js.uncompressed.js | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/lib/dijit/form/_FormWidget.js.uncompressed.js b/lib/dijit/form/_FormWidget.js.uncompressed.js new file mode 100644 index 000000000..f4a44fc79 --- /dev/null +++ b/lib/dijit/form/_FormWidget.js.uncompressed.js @@ -0,0 +1,79 @@ +define("dijit/form/_FormWidget", [ + "dojo/_base/declare", // declare + "dojo/_base/kernel", // kernel.deprecated + "dojo/ready", + "../_Widget", + "../_CssStateMixin", + "../_TemplatedMixin", + "./_FormWidgetMixin" +], function(declare, kernel, ready, _Widget, _CssStateMixin, _TemplatedMixin, _FormWidgetMixin){ + +/*===== +var _Widget = dijit._Widget; +var _TemplatedMixin = dijit._TemplatedMixin; +var _CssStateMixin = dijit._CssStateMixin; +var _FormWidgetMixin = dijit.form._FormWidgetMixin; +=====*/ + +// module: +// dijit/form/_FormWidget +// summary: +// FormWidget + + +// Back compat w/1.6, remove for 2.0 +if(!kernel.isAsync){ + ready(0, function(){ + var requires = ["dijit/form/_FormValueWidget"]; + require(requires); // use indirection so modules not rolled into a build + }); +} + +return declare("dijit.form._FormWidget", [_Widget, _TemplatedMixin, _CssStateMixin, _FormWidgetMixin], { + // summary: + // Base class for widgets corresponding to native HTML elements such as <checkbox> or <button>, + // which can be children of a <form> node or a `dijit.form.Form` widget. + // + // description: + // Represents a single HTML element. + // All these widgets should have these attributes just like native HTML input elements. + // You can set them during widget construction or afterwards, via `dijit._Widget.attr`. + // + // They also share some common methods. + + setDisabled: function(/*Boolean*/ disabled){ + // summary: + // Deprecated. Use set('disabled', ...) instead. + kernel.deprecated("setDisabled("+disabled+") is deprecated. Use set('disabled',"+disabled+") instead.", "", "2.0"); + this.set('disabled', disabled); + }, + + setValue: function(/*String*/ value){ + // summary: + // Deprecated. Use set('value', ...) instead. + kernel.deprecated("dijit.form._FormWidget:setValue("+value+") is deprecated. Use set('value',"+value+") instead.", "", "2.0"); + this.set('value', value); + }, + + getValue: function(){ + // summary: + // Deprecated. Use get('value') instead. + kernel.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.", "", "2.0"); + return this.get('value'); + }, + + postMixInProperties: function(){ + // Setup name=foo string to be referenced from the template (but only if a name has been specified) + // Unfortunately we can't use _setNameAttr to set the name due to IE limitations, see #8484, #8660. + // Regarding escaping, see heading "Attribute values" in + // http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.2 + this.nameAttrSetting = this.name ? ('name="' + this.name.replace(/'/g, """) + '"') : ''; + this.inherited(arguments); + }, + + // Override automatic assigning type --> focusNode, it causes exception on IE. + // Instead, type must be specified as ${type} in the template, as part of the original DOM + _setTypeAttr: null +}); + +}); |