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