]>
Commit | Line | Data |
---|---|---|
b0ee976f DM |
1 | Ext.define('PBS.store.NavigationStore', { |
2 | extend: 'Ext.data.TreeStore', | |
3 | ||
4 | storeId: 'NavigationStore', | |
5 | ||
6 | root: { | |
7 | expanded: true, | |
8 | children: [ | |
9 | { | |
10 | text: gettext('Configuration'), | |
11 | iconCls: 'fa fa-gears', | |
12 | path: 'pbsSystemConfiguration', | |
13 | expanded: true, | |
14 | children: [ | |
15 | { | |
16 | text: gettext('Data Store'), | |
17 | iconCls: 'fa fa-envelope-o', | |
d85facd1 | 18 | path: 'pbsDataStoreConfig', |
b0ee976f DM |
19 | leaf: true |
20 | }, | |
21 | { | |
22 | text: gettext('Subscription'), | |
23 | iconCls: 'fa fa-support', | |
24 | path: 'pbsSubscription', | |
25 | leaf: true | |
26 | } | |
27 | ] | |
28 | }, | |
29 | { | |
30 | text: gettext('Administration'), | |
31 | iconCls: 'fa fa-wrench', | |
32 | path: 'pbsServerAdministration', | |
33 | leaf: true | |
34 | } | |
35 | ] | |
36 | } | |
37 | }); | |
38 | ||
39 | Ext.define('PBS.view.main.NavigationTree', { | |
40 | extend: 'Ext.list.Tree', | |
41 | xtype: 'navigationtree', | |
42 | ||
43 | select: function(path) { | |
44 | var me = this; | |
45 | var item = me.getStore().findRecord('path', path, 0, false, true, true); | |
46 | me.setSelection(item); | |
47 | }, | |
48 | ||
49 | animation: false, | |
50 | expanderOnly: true, | |
51 | expanderFirst: false, | |
52 | store: 'NavigationStore', | |
53 | ui: 'nav' | |
54 | }); |