Skip to content
This repository was archived by the owner on Jun 13, 2019. It is now read-only.

Commit 6a95622

Browse files
author
Jay Garcia
committed
added icon mgr
1 parent d7df842 commit 6a95622

File tree

9,857 files changed

+1638285
-1389617
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,857 files changed

+1638285
-1389617
lines changed

.DS_Store

0 Bytes
Binary file not shown.

examples/.DS_Store

6 KB
Binary file not shown.

examples/ch01/MyGrid.js

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
Ext.define('MyApp.EmployeeModel', {
2+
extend : 'Ext.data.Model',
3+
fields : [
4+
'id',
5+
'firstName',
6+
'lastName',
7+
'middle',
8+
'title',
9+
'street',
10+
'city',
11+
'state',
12+
'zip',
13+
'departmentId',
14+
'dateHired',
15+
'dateFired',
16+
'dob',
17+
'officePhone',
18+
'homePhone',
19+
'mobilePhone',
20+
'email',
21+
'fullName'
22+
]
23+
});
24+
25+
Ext.define('MyApp.EmployeeStore', {
26+
extend : 'Ext.data.Store',
27+
type : 'json',
28+
model : 'MyApp.EmployeeModel',
29+
autoLoad : true,
30+
proxy : {
31+
type : 'ajax',
32+
url : 'employees.json'
33+
}
34+
});
35+
36+
Ext.define('MyApp.Mygrid', {
37+
extend : 'Ext.grid.Panel',
38+
alias : 'widget.MyApp_MyGrid',
39+
40+
border : false,
41+
42+
43+
initComponent : function() {
44+
45+
this.columns = this.buildColumns();
46+
this.store = Ext.create('MyApp.EmployeeStore');
47+
this.plugins = Ext.create('plugin.cellediting',{
48+
clicksToEdit : 1
49+
});
50+
51+
this.callParent();
52+
},
53+
buildColumns : function() {
54+
return [
55+
{
56+
text : 'Last Name',
57+
flex : 1,
58+
dataIndex : 'lastName'
59+
},
60+
{
61+
text : 'DOB',
62+
flex : 1,
63+
dataIndex : 'dob',
64+
field : {
65+
xtype : 'datefield'
66+
}
67+
},
68+
{
69+
text : 'Email',
70+
dataIndex : 'email',
71+
flex : 1,
72+
field : {
73+
xtype : 'textfield'
74+
}
75+
}
76+
];
77+
}
78+
79+
});

examples/ch01/charts.html

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5+
6+
<link rel="stylesheet" type="text/css" href="../../ext4/resources/css/ext-all.css" />
7+
<script type="text/javascript" src="../../ext4/ext-all-debug.js"></script>
8+
<script type='text/javascript'>
9+
10+
11+
12+
13+
14+
15+
Ext.onReady(function() {
16+
17+
Ext.create('MyApp.MyDockWindow',{
18+
height : 300,
19+
width : 650
20+
}).show();
21+
22+
});
23+
24+
</script>
25+
26+
</head>
27+
<body></body>
28+
</html>

examples/ch01/complex_form.html

+199
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5+
6+
<link rel="stylesheet" type="text/css" href="../../ext4/resources/css/ext-all.css" />
7+
<script type="text/javascript" src="../../ext4/ext-all-debug.js"></script>
8+
<script type='text/javascript'>
9+
Ext.onReady(function() {
10+
var nameFields = {
11+
xtype : 'fieldcontainer',
12+
fieldLabel : 'Your Name: (First, middle, last)',
13+
defaults : {
14+
labelWidth : 0
15+
},
16+
items : [
17+
{
18+
flex : 1,
19+
emptyText : 'First',
20+
margins : '0 5 0 0'
21+
},
22+
{
23+
width : 100,
24+
emptyText : 'Middle',
25+
margins : '0 5 0 0'
26+
},
27+
{
28+
emptyText : 'Last',
29+
flex : 1,
30+
margins : '0 5'
31+
}
32+
]
33+
};
34+
35+
var phoneFields = {
36+
xtype : 'fieldcontainer',
37+
fieldLabel : 'Phone numbers',
38+
layout : 'vbox',
39+
height : 80,
40+
defaults : {
41+
labelWidth : 40
42+
},
43+
items : [
44+
{
45+
xtype : 'container',
46+
layout : 'hbox',
47+
width : 400,
48+
height : 30,
49+
defaultType : 'textfield',
50+
items : [
51+
{
52+
fieldLabel : 'Home',
53+
labelWidth : 40,
54+
margins : '0 5 0 0'
55+
},
56+
{
57+
fieldLabel : 'Office',
58+
labelWidth : 40
59+
}
60+
]
61+
},
62+
{
63+
xtype : 'container',
64+
layout : 'hbox',
65+
width : 400,
66+
height : 30,
67+
defaultType : 'textfield',
68+
items : [
69+
{
70+
fieldLabel : 'Mobile',
71+
labelWidth : 40,
72+
margins : '0 5 0 0'
73+
},
74+
{
75+
fieldLabel : 'Pager',
76+
labelWidth : 40
77+
}
78+
]
79+
}
80+
]
81+
};
82+
83+
84+
85+
var emailFields = {
86+
xtype : 'fieldcontainer',
87+
fieldLabel : 'Email addresses',
88+
defaults : {
89+
labelWidth : 45,
90+
flex : 1,
91+
margins : '0 5 0 0'
92+
},
93+
items : [
94+
{
95+
fieldLabel : 'Email 1'
96+
},
97+
{
98+
fieldLabel : 'Email 2'
99+
}
100+
]
101+
};
102+
103+
104+
var buildAddrFields = function() {
105+
return [
106+
{
107+
fieldLabel : 'Street'
108+
},
109+
{
110+
fieldLabel : 'City'
111+
},
112+
{
113+
fieldLabel : 'State/Province'
114+
},
115+
{
116+
fieldLabel : 'Postal Code'
117+
},
118+
{
119+
fieldLabel : 'Country'
120+
}
121+
]
122+
};
123+
124+
var tabPanelFields = {
125+
xtype : 'tabpanel',
126+
plain : true,
127+
height : 170,
128+
defaults : {
129+
bodyStyle : 'padding: 5px;',
130+
layout : 'anchor'
131+
},
132+
items : [
133+
{
134+
title : 'Home Address',
135+
defaultType : 'textfield',
136+
items : buildAddrFields(),
137+
defaults : {
138+
labelWidth : 90,
139+
anchor : '-10'
140+
}
141+
},
142+
{
143+
title : 'Office Address',
144+
defaultType : 'textfield',
145+
items : buildAddrFields(),
146+
defaults : {
147+
labelWidth : 90,
148+
anchor : '-10'
149+
}
150+
}
151+
]
152+
};
153+
154+
Ext.create('Ext.window.Window',{
155+
height : 460,
156+
width : 425,
157+
resizable : true,
158+
layout : 'fit',
159+
border : false,
160+
items : [
161+
{
162+
xtype : 'form',
163+
bodyStyle : 'padding: 5px; background-color: #DFEAF2;',
164+
layout : 'anchor',
165+
defaults : {
166+
anchor : '100%',
167+
labelStyle : 'font-size: 1.25em; color: #666', //<--- evil!?
168+
labelAlign : 'top',
169+
layout : 'hbox',
170+
defaultType : 'textfield'
171+
},
172+
items : [
173+
nameFields,
174+
phoneFields,
175+
emailFields,
176+
{
177+
xtype : 'fieldcontainer',
178+
fieldLabel : 'Physical addresses',
179+
layout : 'fit',
180+
items : tabPanelFields
181+
}
182+
]
183+
}
184+
],
185+
buttons : [
186+
{
187+
text : 'Submit'
188+
}
189+
]
190+
}).show();
191+
192+
})
193+
194+
195+
</script>
196+
197+
</head>
198+
<body></body>
199+
</html>

0 commit comments

Comments
 (0)