Sha256: 2768d5c688d7bb5a80e14abc37b9d639f5209c93890999206e2f2e3b8c4fffba

Contents?: true

Size: 1.46 KB

Versions: 4

Compression:

Stored size: 1.46 KB

Contents

dojo.provide("dijit.form.CurrencyTextBox");

//FIXME: dojo.experimental throws an unreadable exception?
//dojo.experimental("dijit.form.CurrencyTextBox");

dojo.require("dojo.currency");
dojo.require("dijit.form.NumberTextBox");

/*=====
dojo.declare(
	"dijit.form.CurrencyTextBox.__Constraints",
	[dijit.form.NumberTextBox.__Constraints, dojo.currency.__FormatOptions, dojo.currency.__ParseOptions]
);
=====*/

dojo.declare(
	"dijit.form.CurrencyTextBox",
	dijit.form.NumberTextBox,
	{
		// summary:
		//		A validating currency textbox
		//
		// currency: String
		//		the [ISO4217](http://en.wikipedia.org/wiki/ISO_4217) currency code, a three letter sequence like "USD"
		currency: "",

		/*=====
		// constraints: dijit.form.CurrencyTextBox.__Constraints 
		constraints: {},
		======*/

		regExpGen: dojo.currency.regexp,
		_formatter: dojo.currency.format,
/*=====
		parse: function(value, constraints){
			//	summary: parses the value as a Currency, according to constraints
			//	value: String
			//
			//	constraints: dojo.currency.__ParseOptions
		},
=====*/
		parse: dojo.currency.parse,

		postMixInProperties: function(){
			if(this.constraints === dijit.form.ValidationTextBox.prototype.constraints){
				// declare a constraints property on 'this' so we don't overwrite the shared default object in 'prototype'
				this.constraints = {};
			}
			this.constraints.currency = this.currency;
			dijit.form.CurrencyTextBox.superclass.postMixInProperties.apply(this, arguments);
		}
	}
);

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dojo-pkg-1.120.0 data/dojo-release-1.2.0-src/dijit/form/CurrencyTextBox.js
dojo-pkg-1.121.0 data/dojo-release-1.2.1-src/dijit/form/CurrencyTextBox.js
dojo-pkg-1.122.0 data/dojo-release-1.2.2-src/dijit/form/CurrencyTextBox.js
dojo-pkg-1.123.0 data/dojo-release-1.2.3-src/dijit/form/CurrencyTextBox.js