Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / output / Ext.data.SortTypes.js
1 Ext.data.JsonP.Ext_data_SortTypes({
2   "tagname": "class",
3   "name": "Ext.data.SortTypes",
4   "doc": "<p>This class defines a series of static methods that are used on a\n<a href=\"#/api/Ext.data.Field\" rel=\"Ext.data.Field\" class=\"docClass\">Ext.data.Field</a> for performing sorting. The methods cast the\nunderlying values into a data type that is appropriate for sorting on\nthat particular field.  If a <a href=\"#/api/Ext.data.Field-cfg-type\" rel=\"Ext.data.Field-cfg-type\" class=\"docClass\">Ext.data.Field.type</a> is specified,\nthe sortType will be set to a sane default if the sortType is not\nexplicitly defined on the field. The sortType will make any necessary\nmodifications to the value and return it.</p>\n\n<ul>\n<li><b>asText</b> - Removes any tags and converts the value to a string</li>\n<li><b>asUCText</b> - Removes any tags and converts the value to an uppercase string</li>\n<li><b>asUCText</b> - Converts the value to an uppercase string</li>\n<li><b>asDate</b> - Converts the value into Unix epoch time</li>\n<li><b>asFloat</b> - Converts the value to a floating point number</li>\n<li><b>asInt</b> - Converts the value to an integer number</li>\n</ul>\n\n\n<p>\nIt is also possible to create a custom sortType that can be used throughout\nan application.\n<pre><code>Ext.apply(Ext.data.SortTypes, {\n    asPerson: function(person){\n        // expects an object with a first and last name property\n        return person.lastName.toUpperCase() + person.firstName.toLowerCase();\n    }    \n});\n\nExt.define('Employee', {\n    extend: 'Ext.data.Model',\n    fields: [{\n        name: 'person',\n        sortType: 'asPerson'\n    }, {\n        name: 'salary',\n        type: 'float' // sortType set to asFloat\n    }]\n});\n</code></pre>\n</p>\n\n",
5   "extends": null,
6   "mixins": [
7
8   ],
9   "alternateClassNames": [
10
11   ],
12   "xtype": null,
13   "author": null,
14   "docauthor": "Evan Trimboli <evan@sencha.com>",
15   "singleton": true,
16   "private": false,
17   "cfg": [
18
19   ],
20   "method": [
21     {
22       "tagname": "method",
23       "name": "asDate",
24       "member": "Ext.data.SortTypes",
25       "doc": "<p>Date sorting</p>\n",
26       "params": [
27         {
28           "type": "Mixed",
29           "name": "s",
30           "doc": "<p>The value being converted</p>\n",
31           "optional": false
32         }
33       ],
34       "return": {
35         "type": "Number",
36         "doc": "<p>The comparison value</p>\n"
37       },
38       "private": false,
39       "static": false,
40       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/SortTypes.js",
41       "linenr": 91,
42       "html_filename": "SortTypes.html",
43       "href": "SortTypes.html#Ext-data-SortTypes-method-asDate",
44       "shortDoc": "<p>Date sorting</p>\n"
45     },
46     {
47       "tagname": "method",
48       "name": "asFloat",
49       "member": "Ext.data.SortTypes",
50       "doc": "<p>Float sorting</p>\n",
51       "params": [
52         {
53           "type": "Mixed",
54           "name": "s",
55           "doc": "<p>The value being converted</p>\n",
56           "optional": false
57         }
58       ],
59       "return": {
60         "type": "Float",
61         "doc": "<p>The comparison value</p>\n"
62       },
63       "private": false,
64       "static": false,
65       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/SortTypes.js",
66       "linenr": 106,
67       "html_filename": "SortTypes.html",
68       "href": "SortTypes.html#Ext-data-SortTypes-method-asFloat",
69       "shortDoc": "<p>Float sorting</p>\n"
70     },
71     {
72       "tagname": "method",
73       "name": "asInt",
74       "member": "Ext.data.SortTypes",
75       "doc": "<p>Integer sorting</p>\n",
76       "params": [
77         {
78           "type": "Mixed",
79           "name": "s",
80           "doc": "<p>The value being converted</p>\n",
81           "optional": false
82         }
83       ],
84       "return": {
85         "type": "Number",
86         "doc": "<p>The comparison value</p>\n"
87       },
88       "private": false,
89       "static": false,
90       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/SortTypes.js",
91       "linenr": 116,
92       "html_filename": "SortTypes.html",
93       "href": "SortTypes.html#Ext-data-SortTypes-method-asInt",
94       "shortDoc": "<p>Integer sorting</p>\n"
95     },
96     {
97       "tagname": "method",
98       "name": "asText",
99       "member": "Ext.data.SortTypes",
100       "doc": "<p>Strips all HTML tags to sort on text only</p>\n",
101       "params": [
102         {
103           "type": "Mixed",
104           "name": "s",
105           "doc": "<p>The value being converted</p>\n",
106           "optional": false
107         }
108       ],
109       "return": {
110         "type": "String",
111         "doc": "<p>The comparison value</p>\n"
112       },
113       "private": false,
114       "static": false,
115       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/SortTypes.js",
116       "linenr": 64,
117       "html_filename": "SortTypes.html",
118       "href": "SortTypes.html#Ext-data-SortTypes-method-asText",
119       "shortDoc": "<p>Strips all HTML tags to sort on text only</p>\n"
120     },
121     {
122       "tagname": "method",
123       "name": "asUCString",
124       "member": "Ext.data.SortTypes",
125       "doc": "<p>Case insensitive string</p>\n",
126       "params": [
127         {
128           "type": "Mixed",
129           "name": "s",
130           "doc": "<p>The value being converted</p>\n",
131           "optional": false
132         }
133       ],
134       "return": {
135         "type": "String",
136         "doc": "<p>The comparison value</p>\n"
137       },
138       "private": false,
139       "static": false,
140       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/SortTypes.js",
141       "linenr": 82,
142       "html_filename": "SortTypes.html",
143       "href": "SortTypes.html#Ext-data-SortTypes-method-asUCString",
144       "shortDoc": "<p>Case insensitive string</p>\n"
145     },
146     {
147       "tagname": "method",
148       "name": "asUCText",
149       "member": "Ext.data.SortTypes",
150       "doc": "<p>Strips all HTML tags to sort on text only - Case insensitive</p>\n",
151       "params": [
152         {
153           "type": "Mixed",
154           "name": "s",
155           "doc": "<p>The value being converted</p>\n",
156           "optional": false
157         }
158       ],
159       "return": {
160         "type": "String",
161         "doc": "<p>The comparison value</p>\n"
162       },
163       "private": false,
164       "static": false,
165       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/SortTypes.js",
166       "linenr": 73,
167       "html_filename": "SortTypes.html",
168       "href": "SortTypes.html#Ext-data-SortTypes-method-asUCText",
169       "shortDoc": "<p>Strips all HTML tags to sort on text only - Case insensitive</p>\n"
170     },
171     {
172       "tagname": "method",
173       "name": "none",
174       "member": "Ext.data.SortTypes",
175       "doc": "<p>Default sort that does nothing</p>\n",
176       "params": [
177         {
178           "type": "Mixed",
179           "name": "s",
180           "doc": "<p>The value being converted</p>\n",
181           "optional": false
182         }
183       ],
184       "return": {
185         "type": "Mixed",
186         "doc": "<p>The comparison value</p>\n"
187       },
188       "private": false,
189       "static": false,
190       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/SortTypes.js",
191       "linenr": 48,
192       "html_filename": "SortTypes.html",
193       "href": "SortTypes.html#Ext-data-SortTypes-method-none",
194       "shortDoc": "<p>Default sort that does nothing</p>\n"
195     }
196   ],
197   "property": [
198     {
199       "tagname": "property",
200       "name": "stripTagsRE",
201       "member": "Ext.data.SortTypes",
202       "type": "RegExp",
203       "doc": "<p>The regular expression used to strip tags</p>\n",
204       "private": false,
205       "static": false,
206       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/SortTypes.js",
207       "linenr": 57,
208       "html_filename": "SortTypes.html",
209       "href": "SortTypes.html#Ext-data-SortTypes-property-stripTagsRE"
210     }
211   ],
212   "event": [
213
214   ],
215   "filename": "/Users/nick/Projects/sencha/SDK/platform/src/data/SortTypes.js",
216   "linenr": 1,
217   "html_filename": "SortTypes.html",
218   "href": "SortTypes.html#Ext-data-SortTypes",
219   "cssVar": [
220
221   ],
222   "cssMixin": [
223
224   ],
225   "component": false,
226   "superclasses": [
227
228   ],
229   "subclasses": [
230
231   ],
232   "mixedInto": [
233
234   ],
235   "allMixins": [
236
237   ]
238 });