summaryrefslogtreecommitdiff
path: root/js/dojo/dojox/mobile/TextBox.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/dojo/dojox/mobile/TextBox.js')
-rw-r--r--js/dojo/dojox/mobile/TextBox.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/js/dojo/dojox/mobile/TextBox.js b/js/dojo/dojox/mobile/TextBox.js
new file mode 100644
index 0000000..532621f
--- /dev/null
+++ b/js/dojo/dojox/mobile/TextBox.js
@@ -0,0 +1,42 @@
+//>>built
+define("dojox/mobile/TextBox", [
+ "dojo/_base/declare",
+ "dojo/dom-construct",
+ "dijit/_WidgetBase",
+ "dijit/form/_FormValueMixin",
+ "dijit/form/_TextBoxMixin"
+], function(declare, domConstruct, WidgetBase, FormValueMixin, TextBoxMixin){
+
+ /*=====
+ WidgetBase = dijit._WidgetBase;
+ FormValueMixin = dijit.form._FormValueMixin;
+ TextBoxMixin = dijit.form._TextBoxMixin;
+ =====*/
+ return declare("dojox.mobile.TextBox",[WidgetBase, FormValueMixin, TextBoxMixin],{
+ // summary:
+ // A non-templated base class for textbox form inputs
+
+ baseClass: "mblTextBox",
+
+ // Override automatic assigning type --> node, it causes exception on IE8.
+ // Instead, type must be specified as this.type when the node is created, as part of the original DOM
+ _setTypeAttr: null,
+
+ // Map widget attributes to DOMNode attributes.
+ _setPlaceHolderAttr: "textbox",
+
+ buildRendering: function(){
+ if(!this.srcNodeRef){
+ this.srcNodeRef = domConstruct.create("input", {"type":this.type});
+ }
+ this.inherited(arguments);
+ this.textbox = this.focusNode = this.domNode;
+ },
+
+ postCreate: function(){
+ this.inherited(arguments);
+ this.connect(this.textbox, "onfocus", "_onFocus");
+ this.connect(this.textbox, "onblur", "_onBlur");
+ }
+ });
+});