]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * Demonstrates a range of Button options the framework offers out of the box\r | |
3 | */\r | |
4 | Ext.define('KitchenSink.view.Buttons', {\r | |
5 | extend: 'Ext.Container',\r | |
6 | \r | |
7 | requires: 'Ext.layout.VBox',\r | |
8 | \r | |
9 | config: {\r | |
10 | layout: {\r | |
11 | type : 'vbox',\r | |
12 | pack : 'center',\r | |
13 | align: 'stretch'\r | |
14 | },\r | |
15 | defaults: {\r | |
16 | xtype: 'container',\r | |
17 | flex : 1,\r | |
18 | layout: {\r | |
19 | type : 'hbox',\r | |
20 | align: 'middle'\r | |
21 | },\r | |
22 | defaults: {\r | |
23 | xtype : 'button',\r | |
24 | flex : 1,\r | |
25 | margin: 10\r | |
26 | }\r | |
27 | },\r | |
28 | items: [\r | |
29 | {\r | |
30 | items: [\r | |
31 | {text: 'Normal'},\r | |
32 | {ui: 'round', text: 'Round'},\r | |
33 | {ui: 'small', text: 'Small'}\r | |
34 | ]\r | |
35 | },\r | |
36 | {\r | |
37 | items: [\r | |
38 | {ui: 'action', text: 'Action'},\r | |
39 | {ui: 'action round', text: 'Round'},\r | |
40 | {ui: 'action small', text: 'Small'}\r | |
41 | ]\r | |
42 | },\r | |
43 | {\r | |
44 | items: [\r | |
45 | {ui: 'decline', text: 'Decline'},\r | |
46 | {ui: 'decline round', text: 'Round'},\r | |
47 | {ui: 'decline small', text: 'Small'}\r | |
48 | ]\r | |
49 | },\r | |
50 | {\r | |
51 | items: Ext.os.deviceType.toLowerCase() == "phone" ? [\r | |
52 | {ui: 'confirm', text: 'Confirm'},\r | |
53 | {ui: 'confirm round', text: 'Round'},\r | |
54 | {ui: 'confirm small', text: 'Small'}\r | |
55 | ] : [\r | |
56 | {ui: 'confirm', text: 'Confirm'},\r | |
57 | {ui: 'confirm round', text: 'Round'},\r | |
58 | {ui: 'confirm small', text: 'Small'},\r | |
59 | {ui: 'back', text: 'Back'}\r | |
60 | ]\r | |
61 | }\r | |
62 | ]\r | |
63 | }\r | |
64 | });\r |