aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojo/currency.js
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojo/currency.js
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojo/currency.js')
-rw-r--r--includes/js/dojo/currency.js97
1 files changed, 0 insertions, 97 deletions
diff --git a/includes/js/dojo/currency.js b/includes/js/dojo/currency.js
deleted file mode 100644
index 6e0eb31..0000000
--- a/includes/js/dojo/currency.js
+++ /dev/null
@@ -1,97 +0,0 @@
-if(!dojo._hasResource["dojo.currency"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.currency"] = true;
-dojo.provide("dojo.currency");
-
-dojo.require("dojo.number");
-dojo.require("dojo.i18n");
-dojo.requireLocalization("dojo.cldr", "currency", null, "zh,en-ca,pt,en-us,de,ja,en,en-au,ROOT,fr,es,ko,zh-tw,it");
-dojo.require("dojo.cldr.monetary");
-
-/*=====
-dojo.currency = {
- // summary: localized formatting and parsing routines for currencies
-}
-=====*/
-
-dojo.currency._mixInDefaults = function(options){
- options = options || {};
- options.type = "currency";
-
- // Get locale-depenent currency data, like the symbol
- var bundle = dojo.i18n.getLocalization("dojo.cldr", "currency", options.locale) || {};
-
- // Mixin locale-independent currency data, like # of places
- var iso = options.currency;
- var data = dojo.cldr.monetary.getData(iso);
-
- dojo.forEach(["displayName","symbol","group","decimal"], function(prop){
- data[prop] = bundle[iso+"_"+prop];
- });
-
- data.fractional = [true, false];
-
- // Mixin with provided options
- return dojo.mixin(data, options);
-}
-
-dojo.currency.format = function(/*Number*/value, /*dojo.number.__FormatOptions?*/options){
-// summary:
-// Format a Number as a currency, using locale-specific settings
-//
-// description:
-// Create a string from a Number using a known, localized pattern.
-// [Formatting patterns](http://www.unicode.org/reports/tr35/#Number_Elements) appropriate to the locale are chosen from the [CLDR](http://unicode.org/cldr)
-// as well as the appropriate symbols and delimiters.
-//
-// value:
-// the number to be formatted.
-
- return dojo.number.format(value, dojo.currency._mixInDefaults(options));
-}
-
-dojo.currency.regexp = function(/*dojo.number.__RegexpOptions?*/options){
-//
-// summary:
-// Builds the regular needed to parse a currency value
-//
-// description:
-// Returns regular expression with positive and negative match, group and decimal separators
-// Note: the options.places default, the number of decimal places to accept, is defined by the currency type.
- return dojo.number.regexp(dojo.currency._mixInDefaults(options)); // String
-}
-
-/*=====
-dojo.declare("dojo.currency.__ParseOptions", [dojo.number.__ParseOptions], {
- // type: String?
- // currency, set by default.
- // symbol: String?
- // override currency symbol. Normally, will be looked up in table of supported currencies,
- // and ISO currency code will be used if not found. See dojo.i18n.cldr.nls->currency.js
- // places: Number?
- // number of decimal places to accept. Default is defined by currency.
- // fractional: Boolean?|Array?
- // where places are implied by pattern or explicit 'places' parameter, whether to include the fractional portion.
- // By default for currencies, it the fractional portion is optional.
- type: "",
- symbol: "",
- places: "",
- fractional: ""
-});
-=====*/
-
-dojo.currency.parse = function(/*String*/expression, /*dojo.currency.__ParseOptions?*/options){
- //
- // summary:
- // Convert a properly formatted currency string to a primitive Number,
- // using locale-specific settings.
- //
- // description:
- // Create a Number from a string using a known, localized pattern.
- // [Formatting patterns](http://www.unicode.org/reports/tr35/#Number_Format_Patterns) are chosen appropriate to the locale.
- //
- // expression: A string representation of a Number
-
- return dojo.number.parse(expression, dojo.currency._mixInDefaults(options));
-}
-
-}