1 if(!dojo._hasResource["dijit.form.CurrencyTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
2 dojo._hasResource["dijit.form.CurrencyTextBox"] = true;
3 dojo.provide("dijit.form.CurrencyTextBox");
5 //FIXME: dojo.experimental throws an unreadable exception?
6 //dojo.experimental("dijit.form.CurrencyTextBox");
8 dojo.require("dojo.currency");
9 dojo.require("dijit.form.NumberTextBox");
12 "dijit.form.CurrencyTextBox",
13 dijit.form.NumberTextBox,
16 // A validating currency textbox
18 // constraints: dijit.form._DateTimeTextBox.__Constraints
21 // the [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD"
28 regExpGen: dojo.currency.regexp,
29 _formatter: dojo.currency.format,
31 parse: function(value, constraints){
32 // summary: parses the value as a Currency, according to constraints
35 // constraints: dojo.currency.__ParseOptions
38 parse: dojo.currency.parse,
40 postMixInProperties: function(){
41 if(this.constraints === dijit.form.ValidationTextBox.prototype.constraints){
42 // declare a constraints property on 'this' so we don't overwrite the shared default object in 'prototype'
43 this.constraints = {};
45 this.constraints.currency = this.currency;
46 dijit.form.CurrencyTextBox.superclass.postMixInProperties.apply(this, arguments);