X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/output/Ext.util.Sorter.js diff --git a/docs/output/Ext.util.Sorter.js b/docs/output/Ext.util.Sorter.js index e4a24543..c7a83c6a 100644 --- a/docs/output/Ext.util.Sorter.js +++ b/docs/output/Ext.util.Sorter.js @@ -1,113 +1,222 @@ Ext.data.JsonP.Ext_util_Sorter({ - "tagname": "class", - "name": "Ext.util.Sorter", - "doc": "

Represents a single sorter that can be applied to a Store

\n", - "extends": "Object", - "mixins": [ - - ], - "alternateClassNames": [ + "allMixins": [ ], - "xtype": null, - "author": null, + "deprecated": null, "docauthor": null, - "singleton": false, - "private": false, - "cfg": [ - { - "tagname": "cfg", - "name": "direction", - "member": "Ext.util.Sorter", - "type": "String", - "doc": "

The direction to sort by. Defaults to ASC

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sorter.js", - "linenr": 27, - "html_filename": "Sorter.html", - "href": "Sorter.html#Ext-util-Sorter-cfg-direction" - }, - { - "tagname": "cfg", - "name": "property", - "member": "Ext.util.Sorter", - "type": "String", - "doc": "

The property to sort by. Required unless sorter is provided

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sorter.js", - "linenr": 8, - "html_filename": "Sorter.html", - "href": "Sorter.html#Ext-util-Sorter-cfg-property" - }, - { - "tagname": "cfg", - "name": "root", - "member": "Ext.util.Sorter", - "type": "String", - "doc": "

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 property out of the data object of each item

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sorter.js", - "linenr": 16, - "html_filename": "Sorter.html", - "href": "Sorter.html#Ext-util-Sorter-cfg-root", - "shortDoc": "Optional root property. This is mostly useful when sorting a Store, in which case we set the\nroot to 'data' to make t..." - }, - { - "tagname": "cfg", - "name": "sorterFn", - "member": "Ext.util.Sorter", - "type": "Function", - "doc": "

A specific sorter function to execute. Can be passed instead of property

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sorter.js", - "linenr": 12, - "html_filename": "Sorter.html", - "href": "Sorter.html#Ext-util-Sorter-cfg-sorterFn" - }, - { - "tagname": "cfg", - "name": "transform", - "member": "Ext.util.Sorter", - "type": "Function", - "doc": "

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.

\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sorter.js", - "linenr": 21, - "html_filename": "Sorter.html", - "href": "Sorter.html#Ext-util-Sorter-cfg-transform", - "shortDoc": "A function that will be run on each value before\nit is compared in the sorter. The function will receive a single arg..." - } - ], - "method": [ + "members": { + "cfg": [ + { + "type": "String", + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "cfg", + "href": "Sorter.html#Ext-util-Sorter-cfg-direction", + "shortDoc": "The direction to sort by. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js", + "private": false, + "name": "direction", + "owner": "Ext.util.Sorter", + "doc": "

The direction to sort by. Defaults to ASC

\n", + "linenr": 87, + "html_filename": "Sorter.html" + }, + { + "type": "String", + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "cfg", + "href": "Sorter.html#Ext-util-Sorter-cfg-property", + "shortDoc": "The property to sort by. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js", + "private": false, + "name": "property", + "owner": "Ext.util.Sorter", + "doc": "

The property to sort by. Required unless sorterFn is provided.\nThe property is extracted from the object directly and compared for sorting using the built in\ncomparison operators.

\n", + "linenr": 59, + "html_filename": "Sorter.html" + }, + { + "type": "String", + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "cfg", + "href": "Sorter.html#Ext-util-Sorter-cfg-root", + "shortDoc": "Optional root property. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js", + "private": false, + "name": "root", + "owner": "Ext.util.Sorter", + "doc": "

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 property out of the data object of each item

\n", + "linenr": 76, + "html_filename": "Sorter.html" + }, + { + "type": "Function", + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "cfg", + "href": "Sorter.html#Ext-util-Sorter-cfg-sorterFn", + "shortDoc": "A specific sorter function to execute. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js", + "private": false, + "name": "sorterFn", + "owner": "Ext.util.Sorter", + "doc": "

A specific sorter function to execute. Can be passed instead of property.\nThis sorter function allows for any kind of custom/complex comparisons.\nThe sorterFn receives two arguments, the objects being compared. The function should return:

\n\n\n\n", + "linenr": 65, + "html_filename": "Sorter.html" + }, + { + "type": "Function", + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "cfg", + "href": "Sorter.html#Ext-util-Sorter-cfg-transform", + "shortDoc": "A function that will be run on each value before\nit is compared in the sorter. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js", + "private": false, + "name": "transform", + "owner": "Ext.util.Sorter", + "doc": "

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.

\n", + "linenr": 81, + "html_filename": "Sorter.html" + } + ], + "method": [ + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Sorter.html#Ext-util-Sorter-method-setDirection", + "shortDoc": "Set the sorting direction for this sorter. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js", + "private": false, + "params": [ + { + "type": "String", + "optional": false, + "doc": "

The direction to sort in. Should be either 'ASC' or 'DESC'.

\n", + "name": "direction" + } + ], + "name": "setDirection", + "owner": "Ext.util.Sorter", + "doc": "

Set the sorting direction for this sorter.

\n", + "linenr": 152, + "return": { + "type": "void", + "doc": "\n" + }, + "html_filename": "Sorter.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Sorter.html#Ext-util-Sorter-method-toggle", + "shortDoc": "Toggles the sorting direction for this sorter. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js", + "private": false, + "params": [ - ], - "property": [ + ], + "name": "toggle", + "owner": "Ext.util.Sorter", + "doc": "

Toggles the sorting direction for this sorter.

\n", + "linenr": 162, + "return": { + "type": "void", + "doc": "\n" + }, + "html_filename": "Sorter.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Sorter.html#Ext-util-Sorter-method-updateSortFunction", + "shortDoc": "Update the sort function for this sorter. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js", + "private": false, + "params": [ + { + "type": "Function", + "optional": false, + "doc": "

(Optional) A new sorter function for this sorter. If not specified it will use the\ndefault sorting function.

\n", + "name": "fn" + } + ], + "name": "updateSortFunction", + "owner": "Ext.util.Sorter", + "doc": "

Update the sort function for this sorter.

\n", + "linenr": 171, + "return": { + "type": "void", + "doc": "\n" + }, + "html_filename": "Sorter.html" + } + ], + "property": [ - ], - "event": [ + ], + "cssVar": [ - ], - "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/Sorter.js", - "linenr": 1, - "html_filename": "Sorter.html", - "href": "Sorter.html#Ext-util-Sorter", - "cssVar": [ + ], + "cssMixin": [ - ], - "cssMixin": [ + ], + "event": [ - ], - "component": false, + ] + }, + "singleton": false, + "alias": null, "superclasses": [ ], + "protected": false, + "tagname": "class", + "mixins": [ + + ], + "href": "Sorter.html#Ext-util-Sorter", "subclasses": [ "Ext.util.Grouper" ], + "static": false, + "author": null, + "component": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Sorter.js", + "private": false, + "alternateClassNames": [ + + ], + "name": "Ext.util.Sorter", + "doc": "

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 sorting property\n- A sorting function

\n\n

As a contrived example, we can specify a custom sorter that sorts by rank:

\n\n
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
\n", "mixedInto": [ ], - "allMixins": [ + "linenr": 1, + "xtypes": [ - ] + ], + "html_filename": "Sorter.html", + "extends": "Object" }); \ No newline at end of file