1 Ext.data.JsonP.Ext_util_Sorter({
15 "href": "Sorter.html#Ext-util-Sorter-cfg-direction",
16 "shortDoc": "The direction to sort by. ...",
18 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js",
21 "owner": "Ext.util.Sorter",
22 "doc": "<p>The direction to sort by. Defaults to ASC</p>\n",
24 "html_filename": "Sorter.html"
32 "href": "Sorter.html#Ext-util-Sorter-cfg-property",
33 "shortDoc": "The property to sort by. ...",
35 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js",
38 "owner": "Ext.util.Sorter",
39 "doc": "<p>The property to sort by. Required unless <a href=\"#/api/Ext.util.Sorter-cfg-sorterFn\" rel=\"Ext.util.Sorter-cfg-sorterFn\" class=\"docClass\">sorterFn</a> is provided.\nThe property is extracted from the object directly and compared for sorting using the built in\ncomparison operators.</p>\n",
41 "html_filename": "Sorter.html"
49 "href": "Sorter.html#Ext-util-Sorter-cfg-root",
50 "shortDoc": "Optional root property. ...",
52 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js",
55 "owner": "Ext.util.Sorter",
56 "doc": "<p>Optional root property. This is mostly useful when sorting a Store, in which case we set the\nroot to 'data' to make the filter pull the <a href=\"#/api/Ext.util.Sorter-cfg-property\" rel=\"Ext.util.Sorter-cfg-property\" class=\"docClass\">property</a> out of the data object of each item</p>\n",
58 "html_filename": "Sorter.html"
66 "href": "Sorter.html#Ext-util-Sorter-cfg-sorterFn",
67 "shortDoc": "A specific sorter function to execute. ...",
69 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js",
72 "owner": "Ext.util.Sorter",
73 "doc": "<p>A specific sorter function to execute. Can be passed instead of <a href=\"#/api/Ext.util.Sorter-cfg-property\" rel=\"Ext.util.Sorter-cfg-property\" class=\"docClass\">property</a>.\nThis sorter function allows for any kind of custom/complex comparisons.\nThe sorterFn receives two arguments, the objects being compared. The function should return:</p>\n\n<ul>\n<li>-1 if o1 is \"less than\" o2</li>\n<li>0 if o1 is \"equal\" to o2</li>\n<li>1 if o1 is \"greater than\" o2</li>\n</ul>\n\n",
75 "html_filename": "Sorter.html"
83 "href": "Sorter.html#Ext-util-Sorter-cfg-transform",
84 "shortDoc": "A function that will be run on each value before\nit is compared in the sorter. ...",
86 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js",
89 "owner": "Ext.util.Sorter",
90 "doc": "<p>A function that will be run on each value before\nit is compared in the sorter. The function will receive a single argument,\nthe value.</p>\n",
92 "html_filename": "Sorter.html"
101 "href": "Sorter.html#Ext-util-Sorter-method-setDirection",
102 "shortDoc": "Set the sorting direction for this sorter. ...",
104 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js",
110 "doc": "<p>The direction to sort in. Should be either 'ASC' or 'DESC'.</p>\n",
114 "name": "setDirection",
115 "owner": "Ext.util.Sorter",
116 "doc": "<p>Set the sorting direction for this sorter.</p>\n",
122 "html_filename": "Sorter.html"
129 "href": "Sorter.html#Ext-util-Sorter-method-toggle",
130 "shortDoc": "Toggles the sorting direction for this sorter. ...",
132 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js",
138 "owner": "Ext.util.Sorter",
139 "doc": "<p>Toggles the sorting direction for this sorter.</p>\n",
145 "html_filename": "Sorter.html"
152 "href": "Sorter.html#Ext-util-Sorter-method-updateSortFunction",
153 "shortDoc": "Update the sort function for this sorter. ...",
155 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js",
161 "doc": "<p>(Optional) A new sorter function for this sorter. If not specified it will use the\ndefault sorting function.</p>\n",
165 "name": "updateSortFunction",
166 "owner": "Ext.util.Sorter",
167 "doc": "<p>Update the sort function for this sorter.</p>\n",
173 "html_filename": "Sorter.html"
199 "href": "Sorter.html#Ext-util-Sorter",
206 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js",
208 "alternateClassNames": [
211 "name": "Ext.util.Sorter",
212 "doc": "<p>Represents a single sorter that can be applied to a Store. The sorter is used\nto compare two values against each other for the purpose of ordering them. Ordering\nis achieved by specifying either:\n- <a href=\"#/api/Ext.util.Sorter-cfg-property\" rel=\"Ext.util.Sorter-cfg-property\" class=\"docClass\">A sorting property</a>\n- <a href=\"#/api/Ext.util.Sorter-cfg-sorterFn\" rel=\"Ext.util.Sorter-cfg-sorterFn\" class=\"docClass\">A sorting function</a></p>\n\n<p>As a contrived example, we can specify a custom sorter that sorts by rank:</p>\n\n<pre><code>Ext.define('Person', {\n extend: 'Ext.data.Model',\n fields: ['name', 'rank']\n});\n\nExt.create('Ext.data.Store', {\n model: 'Person',\n proxy: 'memory',\n sorters: [{\n sorterFn: function(o1, o2){\n var getRank = function(o){\n var name = o.get('rank');\n if (name === 'first') {\n return 1;\n } else if (name === 'second') {\n return 2;\n } else {\n return 3;\n }\n },\n rank1 = getRank(o1),\n rank2 = getRank(o2);\n\n if (rank1 === rank2) {\n return 0;\n }\n\n return rank1 < rank2 ? -1 : 1;\n }\n }],\n data: [{\n name: 'Person1',\n rank: 'second'\n }, {\n name: 'Person2',\n rank: 'third'\n }, {\n name: 'Person3',\n rank: 'first'\n }] \n});\n</code></pre>\n",
220 "html_filename": "Sorter.html",