]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | Ext.define('Neptune.view.menu.Menus', function() {\r |
2 | var count = 0,\r | |
3 | container, item;\r | |
4 | \r | |
5 | function getItems() {\r | |
6 | count++;\r | |
7 | return [\r | |
8 | { text: 'icon', iconCls: 'feed' },\r | |
9 | { checked: true, text: 'check item' },\r | |
10 | { text: 'plain item', plain: true },\r | |
11 | { text: 'Sub Menu', menu: [\r | |
12 | { text: 'no icon' },\r | |
13 | ] },\r | |
14 | { xtype: 'menucheckitem', text: 'check icon', iconCls: 'feed' },\r | |
15 | { checked: false, text: 'check icon right', iconCls: 'feed', iconAlign: 'right' },\r | |
16 | { text: 'icon menu', iconCls: 'feed', menu: [\r | |
17 | { text: 'fubar' }\r | |
18 | ] },\r | |
19 | { text: 'icon right menu', iconCls: 'feed', iconAlign: 'right', menu: [\r | |
20 | { text: 'fubar' }\r | |
21 | ] },\r | |
22 | { checked: true, text: 'check icon right menu', iconCls: 'feed', iconAlign: 'right', menu: [\r | |
23 | { text: 'fubar' }\r | |
24 | ] },\r | |
25 | { text: 'icon right', iconCls: 'feed', iconAlign: 'right' },\r | |
26 | { text: 'some awesome<br/>wrapping text' },\r | |
27 | { xtype: 'textfield' },\r | |
28 | { xtype: 'combo' },\r | |
29 | { xtype: 'numberfield' },\r | |
30 | {text: 'Checked Option', checked: true, group: 'opts' + count},\r | |
31 | {text: 'Unchecked Option', checked: false, group: 'opts' + count},\r | |
32 | {text: 'Ck Option Menu', checked: true, group: 'grp' + count, menu: [\r | |
33 | { text: 'fubar' }\r | |
34 | ] },\r | |
35 | {text: 'Ck Opt Menu Icon', iconCls: 'feed', checked: true, group: 'foo' + count, menu: [\r | |
36 | { text: 'fubar' }\r | |
37 | ] },\r | |
38 | {text: 'Ck Opt Icon', iconCls: 'feed', checked: true, group: 'bar' + count},\r | |
39 | {text: 'Ck Opt Icon Right', iconCls: 'feed', iconAlign: 'right', checked: true, group: 'baz' + count}\r | |
40 | ];\r | |
41 | }\r | |
42 | \r | |
43 | return {\r | |
44 | extend: 'Ext.container.Container',\r | |
45 | xtype: 'menus',\r | |
46 | id: 'menus',\r | |
47 | layout: {\r | |
48 | type: 'table',\r | |
49 | columns: 3,\r | |
50 | tdAttrs: {\r | |
51 | width: 250\r | |
52 | }\r | |
53 | },\r | |
54 | defaults: {\r | |
55 | xtype: 'menu',\r | |
56 | floating: false,\r | |
57 | shrinkWrap: true,\r | |
58 | margin: '0 10 0 0'\r | |
59 | },\r | |
60 | items: [\r | |
61 | { xtype: 'component', html: '<h3>showSeparator: true</h3>' },\r | |
62 | { xtype: 'component', html: '<h3>showSeparator: false</h3>' },\r | |
63 | { xtype: 'component', html: '<h3>plain: true</h3>' },\r | |
64 | { items: getItems(), showSeparator: true },\r | |
65 | { items: getItems(), showSeparator: false },\r | |
66 | { items: getItems(), plain: true }\r | |
67 | ]\r | |
68 | };\r | |
69 | }); |