]> git.proxmox.com Git - extjs.git/blame - extjs/examples/kitchensink/modern/src/view/NestedList.js
add extjs 6.0.1 sources
[extjs.git] / extjs / examples / kitchensink / modern / src / view / NestedList.js
CommitLineData
6527f429
DM
1/**\r
2 * Demonstrates a NestedList, which uses a TreeStore to drill down through hierarchical data\r
3 */\r
4Ext.define('KitchenSink.view.NestedList', {\r
5 extend: 'Ext.NestedList',\r
6 requires: [\r
7 'Ext.data.TreeStore',\r
8 'KitchenSink.view.EditorPanel',\r
9 'KitchenSink.model.Cars'\r
10 ],\r
11\r
12 config: {\r
13 store: {\r
14 type: 'tree',\r
15 id: 'NestedListStore',\r
16 model: 'KitchenSink.model.Cars',\r
17 root: {},\r
18 proxy: {\r
19 type: 'ajax',\r
20 url: 'data/carregions.json'\r
21 }\r
22 },\r
23 displayField: 'text',\r
24 listeners: {\r
25 leafitemtap: function(me, list, index, item) {\r
26 var editorPanel = Ext.getCmp('editorPanel') || new KitchenSink.view.EditorPanel();\r
27 editorPanel.setRecord(list.getStore().getAt(index));\r
28 if (!editorPanel.getParent()) {\r
29 Ext.Viewport.add(editorPanel);\r
30 }\r
31 editorPanel.show();\r
32 }\r
33 }\r
34 },\r
35\r
36 platformConfig: {\r
37 blackberry: {\r
38 toolbar: {\r
39 ui: 'dark'\r
40 }\r
41 }\r
42 }\r
43});\r