X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6746dc89c47ed01b165cc1152533605f97eb8e8d..HEAD:/docs/output/Ext.util.Format.js diff --git a/docs/output/Ext.util.Format.js b/docs/output/Ext.util.Format.js index 5a554c79..cc582f8b 100644 --- a/docs/output/Ext.util.Format.js +++ b/docs/output/Ext.util.Format.js @@ -1,925 +1 @@ -Ext.data.JsonP.Ext_util_Format({ - "allMixins": [ - - ], - "deprecated": null, - "docauthor": null, - "members": { - "cfg": [ - - ], - "method": [ - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-capitalize", - "shortDoc": "Capitalize the given string. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - - ], - "name": "capitalize", - "owner": "Ext.util.Format", - "doc": "
Capitalize the given string. See Ext.String.capitalize.
\n", - "linenr": 442, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-currency", - "shortDoc": "Format a number as a currency ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "Number/String", - "optional": false, - "doc": "The numeric value to format
\n", - "name": "value" - }, - { - "type": "String", - "optional": false, - "doc": "The currency sign to use (defaults to currencySign)
\n", - "name": "sign" - }, - { - "type": "Number", - "optional": false, - "doc": "The number of decimals to use for the currency (defaults to currencyPrecision)
\n", - "name": "decimals" - }, - { - "type": "Boolean", - "optional": false, - "doc": "True if the currency sign should be at the end of the string (defaults to currencyAtEnd)
\n", - "name": "end" - } - ], - "name": "currency", - "owner": "Ext.util.Format", - "doc": "Format a number as a currency
\n", - "linenr": 165, - "return": { - "type": "String", - "doc": "The formatted currency string
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-date", - "shortDoc": "Formats the passed date using the specified format pattern. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "String/Date", - "optional": false, - "doc": "The value to format. If a string is passed, it is converted to a Date by the Javascript\nDate object's parse() method.
\n", - "name": "value" - }, - { - "type": "String", - "optional": false, - "doc": "(Optional) Any valid date format string. Defaults to Ext.Date.defaultFormat.
\n", - "name": "format" - } - ], - "name": "date", - "owner": "Ext.util.Format", - "doc": "Formats the passed date using the specified format pattern.
\n", - "linenr": 195, - "return": { - "type": "String", - "doc": "The formatted date string.
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-dateRenderer", - "shortDoc": "Returns a date rendering function that can be reused to apply a date format multiple times efficiently ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "String", - "optional": false, - "doc": "Any valid date format string. Defaults to Ext.Date.defaultFormat.
\n", - "name": "format" - } - ], - "name": "dateRenderer", - "owner": "Ext.util.Format", - "doc": "Returns a date rendering function that can be reused to apply a date format multiple times efficiently
\n", - "linenr": 212, - "return": { - "type": "Function", - "doc": "The date formatting function
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-defaultValue", - "shortDoc": "Checks a reference and converts it to the default value if it's empty ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "Mixed", - "optional": false, - "doc": "Reference to check
\n", - "name": "value" - }, - { - "type": "String", - "optional": false, - "doc": "The value to insert of it's undefined (defaults to \"\")
\n", - "name": "defaultValue" - } - ], - "name": "defaultValue", - "owner": "Ext.util.Format", - "doc": "Checks a reference and converts it to the default value if it's empty
\n", - "linenr": 117, - "return": { - "type": "String", - "doc": "\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-ellipsis", - "shortDoc": "Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - - ], - "name": "ellipsis", - "owner": "Ext.util.Format", - "doc": "Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length.\nSee Ext.String.ellipsis.
\n", - "linenr": 448, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-escapeRegex", - "shortDoc": "Escapes the passed string for use in a regular expression ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "String", - "optional": false, - "doc": "\n", - "name": "str" - } - ], - "name": "escapeRegex", - "owner": "Ext.util.Format", - "doc": "Escapes the passed string for use in a regular expression
\n", - "linenr": 519, - "return": { - "type": "String", - "doc": "\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-fileSize", - "shortDoc": "Simple format for a file size (xxx bytes, xxx KB, xxx MB) ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "Number/String", - "optional": false, - "doc": "The numeric value to format
\n", - "name": "size" - } - ], - "name": "fileSize", - "owner": "Ext.util.Format", - "doc": "Simple format for a file size (xxx bytes, xxx KB, xxx MB)
\n", - "linenr": 241, - "return": { - "type": "String", - "doc": "The formatted file size
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-format", - "shortDoc": "Formats to a string. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - - ], - "name": "format", - "owner": "Ext.util.Format", - "doc": "Formats to a string. See Ext.String.format
\n", - "linenr": 455, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-htmlDecode", - "shortDoc": "Convert certain characters (&, <, >, and ') from their HTML character equivalents. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - - ], - "name": "htmlDecode", - "owner": "Ext.util.Format", - "doc": "Convert certain characters (&, <, >, and ') from their HTML character equivalents.\nSee Ext.String.htmlDecode.
\n", - "linenr": 461, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-htmlEncode", - "shortDoc": "Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - - ], - "name": "htmlEncode", - "owner": "Ext.util.Format", - "doc": "Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.\nSee Ext.String.htmlEncode.
\n", - "linenr": 468, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-leftPad", - "shortDoc": "Adds left padding to a string. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - - ], - "name": "leftPad", - "owner": "Ext.util.Format", - "doc": "Adds left padding to a string. See Ext.String.leftPad
\n", - "linenr": 475, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-lowercase", - "shortDoc": "Converts a string to all lower case letters ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "String", - "optional": false, - "doc": "The text to convert
\n", - "name": "value" - } - ], - "name": "lowercase", - "owner": "Ext.util.Format", - "doc": "Converts a string to all lower case letters
\n", - "linenr": 138, - "return": { - "type": "String", - "doc": "The converted text
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-math", - "shortDoc": "It does simple math for use in a template, for example:\n\nvar tpl = new Ext.Template('{value} * 10 = {value:math(\"* 10...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - - ], - "name": "math", - "owner": "Ext.util.Format", - "doc": "It does simple math for use in a template, for example:
\n\nvar tpl = new Ext.Template('{value} * 10 = {value:math(\"* 10\")}');\n
\n\n",
- "linenr": 256,
- "return": {
- "type": "Function",
- "doc": "A function that operates on the passed value.
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-nl2br", - "shortDoc": "Converts newline characters to the HTML tag <br/> ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "String", - "optional": false, - "doc": "string value to format.
\n", - "name": "The" - } - ], - "name": "nl2br", - "owner": "Ext.util.Format", - "doc": "Converts newline characters to the HTML tag <br/>
\n", - "linenr": 433, - "return": { - "type": "String", - "doc": "The string with embedded <br/> tags in place of newlines.
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-number", - "shortDoc": "Formats the passed number according to the passed format string. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "Number", - "optional": false, - "doc": "The number to format.
\n", - "name": "v" - }, - { - "type": "String", - "optional": false, - "doc": "The way you would like to format this text.
\n", - "name": "format" - } - ], - "name": "number", - "owner": "Ext.util.Format", - "doc": "Formats the passed number according to the passed format string.
\n\n\nThe number of digits after the decimal separator character specifies the number of\ndecimal places in the resulting string. The local-specific decimal character is used in the result.
\n\n\nThe presence of a thousand separator character in the format string specifies that\nthe locale-specific thousand separator (if any) is inserted separating thousand groups.
\n\n\nBy default, \",\" is expected as the thousand separator, and \".\" is expected as the decimal separator.
\n\n\nNew to Ext4
\n\n\nLocale-specific characters are always used in the formatted output when inserting\nthousand and decimal separators.
\n\n\nThe format string must specify separator characters according to US/UK conventions (\",\" as the\nthousand separator, and \".\" as the decimal separator)
\n\n\nTo allow specification of format strings according to local conventions for separator characters, add\nthe string /i
to the end of the format string.
The formatted number.
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-numberRenderer", - "shortDoc": "Returns a number rendering function that can be reused to apply a number format multiple times efficiently ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "String", - "optional": false, - "doc": "Any valid number format string for number
\n", - "name": "format" - } - ], - "name": "numberRenderer", - "owner": "Ext.util.Format", - "doc": "Returns a number rendering function that can be reused to apply a number format multiple times efficiently
\n", - "linenr": 410, - "return": { - "type": "Function", - "doc": "The number formatting function
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-parseBox", - "shortDoc": "Parses a number or string representing margin sizes into an object. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "Number|String", - "optional": false, - "doc": "The encoded margins
\n", - "name": "v" - } - ], - "name": "parseBox", - "owner": "Ext.util.Format", - "doc": "Parses a number or string representing margin sizes into an object. Supports CSS-style margin declarations\n(e.g. 10, \"10\", \"10 10\", \"10 10 10\" and \"10 10 10 10\" are all valid options and would return the same result)
\n", - "linenr": 487, - "return": { - "type": "Object", - "doc": "An object with margin sizes for top, right, bottom and left
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-plural", - "shortDoc": "Selectively do a plural form of a word based on a numeric value. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "Number", - "optional": false, - "doc": "The value to compare against
\n", - "name": "value" - }, - { - "type": "String", - "optional": false, - "doc": "The singular form of the word
\n", - "name": "singular" - }, - { - "type": "String", - "optional": true, - "doc": "(optional) The plural form of the word (defaults to the singular with an \"s\")
\n", - "name": "plural" - } - ], - "name": "plural", - "owner": "Ext.util.Format", - "doc": "Selectively do a plural form of a word based on a numeric value. For example, in a template,\n{commentCount:plural(\"Comment\")} would result in \"1 Comment\" if commentCount was 1 or would be \"x Comments\"\nif the value is 0 or greater than 1.
\n", - "linenr": 421, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-round", - "shortDoc": "Rounds the passed number to the required decimal precision. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "Number/String", - "optional": false, - "doc": "The numeric value to round.
\n", - "name": "value" - }, - { - "type": "Number", - "optional": false, - "doc": "The number of decimal places to which to round the first parameter's value.
\n", - "name": "precision" - } - ], - "name": "round", - "owner": "Ext.util.Format", - "doc": "Rounds the passed number to the required decimal precision.
\n", - "linenr": 274, - "return": { - "type": "Number", - "doc": "The rounded value.
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-stripScripts", - "shortDoc": "Strips all script tags ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "Mixed", - "optional": false, - "doc": "The text from which to strip script tags
\n", - "name": "value" - } - ], - "name": "stripScripts", - "owner": "Ext.util.Format", - "doc": "Strips all script tags
\n", - "linenr": 232, - "return": { - "type": "String", - "doc": "The stripped text
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-stripTags", - "shortDoc": "Strips all HTML tags ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "Mixed", - "optional": false, - "doc": "The text from which to strip tags
\n", - "name": "value" - } - ], - "name": "stripTags", - "owner": "Ext.util.Format", - "doc": "Strips all HTML tags
\n", - "linenr": 223, - "return": { - "type": "String", - "doc": "The stripped text
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-substr", - "shortDoc": "Returns a substring from within an original string ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "String", - "optional": false, - "doc": "The original text
\n", - "name": "value" - }, - { - "type": "Number", - "optional": false, - "doc": "The start index of the substring
\n", - "name": "start" - }, - { - "type": "Number", - "optional": false, - "doc": "The length of the substring
\n", - "name": "length" - } - ], - "name": "substr", - "owner": "Ext.util.Format", - "doc": "Returns a substring from within an original string
\n", - "linenr": 127, - "return": { - "type": "String", - "doc": "The substring
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-trim", - "shortDoc": "Trims any whitespace from either side of a string. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - - ], - "name": "trim", - "owner": "Ext.util.Format", - "doc": "Trims any whitespace from either side of a string. See Ext.String.trim.
\n", - "linenr": 481, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-undef", - "shortDoc": "Checks a reference and converts it to empty string if it is undefined ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "Mixed", - "optional": false, - "doc": "Reference to check
\n", - "name": "value" - } - ], - "name": "undef", - "owner": "Ext.util.Format", - "doc": "Checks a reference and converts it to empty string if it is undefined
\n", - "linenr": 108, - "return": { - "type": "Mixed", - "doc": "Empty string if converted, otherwise the original value
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-uppercase", - "shortDoc": "Converts a string to all upper case letters ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "String", - "optional": false, - "doc": "The text to convert
\n", - "name": "value" - } - ], - "name": "uppercase", - "owner": "Ext.util.Format", - "doc": "Converts a string to all upper case letters
\n", - "linenr": 147, - "return": { - "type": "String", - "doc": "The converted text
\n" - }, - "html_filename": "Format.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Format.html#Ext-util-Format-method-usMoney", - "shortDoc": "Format a number as US currency ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "params": [ - { - "type": "Number/String", - "optional": false, - "doc": "The numeric value to format
\n", - "name": "value" - } - ], - "name": "usMoney", - "owner": "Ext.util.Format", - "doc": "Format a number as US currency
\n", - "linenr": 156, - "return": { - "type": "String", - "doc": "The formatted currency string
\n" - }, - "html_filename": "Format.html" - } - ], - "property": [ - { - "type": "Boolean", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "property", - "href": "Format.html#Ext-util-Format-property-currencyAtEnd", - "shortDoc": "This may be set to true to make the currency function\nappend the currency sign to the formatted value. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/Format.js", - "private": false, - "name": "currencyAtEnd", - "owner": "Ext.util.Format", - "doc": "This may be set to true
to make the currency function\nappend the currency sign to the formatted value.
This defaults to false
, but may be overridden in a locale file.
The number of decimal places that the currency function displays.
\n\n\nThis defaults to 2
, but may be overridden in a locale file.
The currency sign that the currency function displays.
\n\n\nThis defaults to $
, but may be overridden in a locale file.
The character that the number function uses as a decimal point.
\n\n\nThis defaults to .
, but may be overridden in a locale file.
The character that the number function uses as a thousand separator.
\n\n\nThis defaults to ,
, but may be overridden in a locale file.
This class is a centralized place for formatting functions inside the library. It includes\nfunctions to format various different types of data, such as text, dates and numeric values.
\n\nLocalization\nThis class contains several options for localization. These can be set once the library has loaded,\nall calls to the functions from that point will use the locale settings that were specified.\nOptions include:\n- thousandSeparator\n- decimalSeparator\n- currenyPrecision\n- currencySign\n- currencyAtEnd\nThis class also uses the default date format defined here: Ext.Date.defaultFormat.
\n\nUsing with renderers\nThere are two helper functions that return a new function that can be used in conjunction with\ngrid renderers:
\n\ncolumns: [{\n dataIndex: 'date',\n renderer: Ext.util.Format.dateRenderer('Y-m-d')\n}, {\n dataIndex: 'time',\n renderer: Ext.util.Format.numberRenderer('0.000')\n}]\n
\n\nFunctions that only take a single argument can also be passed directly:
\n\ncolumns: [{\n dataIndex: 'cost',\n renderer: Ext.util.Format.usMoney\n}, {\n dataIndex: 'productCode',\n renderer: Ext.util.Format.uppercase\n}]\n
\n\nUsing with XTemplates\nXTemplates can also directly use Ext.util.Format functions:
\n\nnew Ext.XTemplate([\n 'Date: {startDate:date(\"Y-m-d\")}',\n 'Cost: {cost:usMoney}'\n]);\n
\n",
- "mixedInto": [
-
- ],
- "linenr": 1,
- "xtypes": [
-
- ],
- "html_filename": "Format.html",
- "extends": null
-});
\ No newline at end of file
+Ext.data.JsonP.Ext_util_Format({"tagname":"class","html":"Files
This class is a centralized place for formatting functions. It includes\nfunctions to format various different types of data, such as text, dates and numeric values.
\n\nLocalization\nThis class contains several options for localization. These can be set once the library has loaded,\nall calls to the functions from that point will use the locale settings that were specified.\nOptions include:\n- thousandSeparator\n- decimalSeparator\n- currenyPrecision\n- currencySign\n- currencyAtEnd\nThis class also uses the default date format defined here: Ext.Date.defaultFormat.
\n\nUsing with renderers\nThere are two helper functions that return a new function that can be used in conjunction with\ngrid renderers:
\n\ncolumns: [{\n dataIndex: 'date',\n renderer: Ext.util.Format.dateRenderer('Y-m-d')\n}, {\n dataIndex: 'time',\n renderer: Ext.util.Format.numberRenderer('0.000')\n}]\n
\n\nFunctions that only take a single argument can also be passed directly:
\n\ncolumns: [{\n dataIndex: 'cost',\n renderer: Ext.util.Format.usMoney\n}, {\n dataIndex: 'productCode',\n renderer: Ext.util.Format.uppercase\n}]\n
\n\nUsing with XTemplates\nXTemplates can also directly use Ext.util.Format functions:
\n\nnew Ext.XTemplate([\n 'Date: {startDate:date(\"Y-m-d\")}',\n 'Cost: {cost:usMoney}'\n]);\n
\nThis may be set to true
to make the currency function\nappend the currency sign to the formatted value.
This may be overridden in a locale file.
\n\nThe number of decimal places that the currency function displays.
\n\n\nThis may be overridden in a locale file.
\n\nThe currency sign that the currency function displays.
\n\n\nThis may be overridden in a locale file.
\n\nThe character that the number function uses as a decimal point.
\n\n\nThis may be overridden in a locale file.
\n\nThe character that the number function uses as a thousand separator.
\n\n\nThis may be overridden in a locale file.
\n\nAlias for Ext.String.capitalize.
\n\nCapitalize the given string
\nFormat a number as a currency
\nThe numeric value to format
\nThe currency sign to use (defaults to currencySign)
\nThe number of decimals to use for the currency (defaults to currencyPrecision)
\nTrue if the currency sign should be at the end of the string (defaults to currencyAtEnd)
\nThe formatted currency string
\nFormats the passed date using the specified format pattern.
\nThe value to format. If a string is passed, it is converted to a Date by the Javascript\nDate object's parse() method.
\nAny valid date format string. Defaults to Ext.Date.defaultFormat.
\nThe formatted date string.
\nReturns a date rendering function that can be reused to apply a date format multiple times efficiently
\nAny valid date format string. Defaults to Ext.Date.defaultFormat.
\nThe date formatting function
\nAlias for Ext.String.ellipsis.
\n\nTruncate a string and add an ellipsis ('...') to the end if it exceeds the specified length
\nThe string to truncate
\nThe maximum length to allow before truncating
\nTrue to try to find a common word break
\nThe converted text
\nAlias for Ext.String.format.
\n\nAllows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each\ntoken must be unique, and must increment in the format {0}, {1}, etc. Example usage:
\n\nvar cls = 'my-class', text = 'Some text';\nvar s = Ext.String.format('<div class=\"{0}\">{1}</div>', cls, text);\n// s now contains the string: '<div class=\"my-class\">Some text</div>'\n
\n\nThe tokenized string to be formatted
\nThe value to replace token {0}
\nEtc...
\nThe formatted string
\nAlias for Ext.String.htmlDecode.
\n\nConvert certain characters (&, <, >, and \") from their HTML character equivalents.
\nThe string to decode
\nThe decoded text
\nAlias for Ext.String.htmlEncode.
\n\nConvert certain characters (&, <, >, and \") to their HTML character equivalents for literal display in web pages.
\nThe string to encode
\nThe encoded text
\nAlias for Ext.String.leftPad.
\n\nPads the left side of a string with a specified character. This is especially useful\nfor normalizing number and date strings. Example usage:
\n\nvar s = Ext.String.leftPad('123', 5, '0');\n// s now contains the string: '00123'\n
\n\nThe original string
\nThe total length of the output string
\nThe character with which to pad the original string (defaults to empty string \" \")
\nThe padded string
\nIt does simple math for use in a template, for example:
\n\nvar tpl = new Ext.Template('{value} * 10 = {value:math(\"* 10\")}');\n
\n\nA function that operates on the passed value.
\nFormats the passed number according to the passed format string.
\n\n\nThe number of digits after the decimal separator character specifies the number of\ndecimal places in the resulting string. The local-specific decimal character is used in the result.
\n\n\nThe presence of a thousand separator character in the format string specifies that\nthe locale-specific thousand separator (if any) is inserted separating thousand groups.
\n\n\nBy default, \",\" is expected as the thousand separator, and \".\" is expected as the decimal separator.
\n\n\nNew to Ext JS 4
\n\n\nLocale-specific characters are always used in the formatted output when inserting\nthousand and decimal separators.
\n\n\nThe format string must specify separator characters according to US/UK conventions (\",\" as the\nthousand separator, and \".\" as the decimal separator)
\n\n\nTo allow specification of format strings according to local conventions for separator characters, add\nthe string /i
to the end of the format string.
The formatted number.
\nParses a number or string representing margin sizes into an object. Supports CSS-style margin declarations\n(e.g. 10, \"10\", \"10 10\", \"10 10 10\" and \"10 10 10 10\" are all valid options and would return the same result)
\nAn object with margin sizes for top, right, bottom and left
\nSelectively do a plural form of a word based on a numeric value. For example, in a template,\n{commentCount:plural(\"Comment\")} would result in \"1 Comment\" if commentCount was 1 or would be \"x Comments\"\nif the value is 0 or greater than 1.
\nAlias for Ext.String.trim.
\n\nTrims whitespace from either end of a string, leaving spaces within the string intact. Example:\n@example\nvar s = ' foo bar ';\nalert('-' + s + '-'); //alerts \"- foo bar -\"\nalert('-' + Ext.String.trim(s) + '-'); //alerts \"-foo bar-\"
\nThe string to escape
\nThe trimmed string
\n