]> git.proxmox.com Git - extjs.git/blame - extjs/examples/kitchensink/modern/src/store/List.js
bump version to 7.0.0-4
[extjs.git] / extjs / examples / kitchensink / modern / src / store / List.js
CommitLineData
947f0963
TL
1Ext.define("KitchenSink.store.List", {
2 extend: 'Ext.data.Store',
3 alias: 'store.List',
4 model: 'KitchenSink.model.Person',
5
6 sorters: 'firstName',
7
8 grouper: {
9 groupFn: function(record) {
10 return record.get('firstName')[0];
11 }
12 },
13
14 data: (function(first, last) {
15 var v = 42,
16 m = 0x7fffFFFF,
17 data = [],
18 i, j, k;
19
20 function random(limit) {
21 v = (v * 48271) % m;
22
23 return Math.floor(v / m * limit);
24 }
25
26 for (k = 0, i = 0; i < first.length; ++i) {
27 for (j = random(5) + 1; j-- > 0; ++k) { // predictable "random" 1-5
28 data.push({
29 firstName: first[i],
30 lastName: last[k % last.length]
31 });
32 }
33 }
34
35 return data;
36 })([
37 'Julio', 'Tania', 'Odessa', 'Nelson', 'Tyrone', 'Allan', 'Cody',
38 'Jessie', 'Javier', 'Guy', 'Jamie', 'Marcie', 'Althea', 'Kenya',
39 'Rae', 'Ted', 'Hillary', 'Elinor', 'Dona', 'Ashlee', 'Alana',
40 'Kelly', 'Mathew', 'Clayton', 'Rosalinda', 'Penelope', 'Katy',
41 'Kathrine', 'Carlene', 'Roxie', 'Margery', 'Avis', 'Esmeralda',
42 'Malinda', 'Tanisha', 'Darren', 'Karina', 'Hugh', 'Zebora'
43 ],
44 [
45 'Benesh', 'Minich', 'Ricco', 'Steuck', 'Raber', 'Scannell',
46 'Disbrow', 'Herrell', 'Burgoyne', 'Boedeker', 'Leyendecker',
47 'Lockley', 'Reasor', 'Brummer', 'Casa', 'Ricca', 'Lamoureaux',
48 'Sturtz', 'Morocco', 'Pasquariello', 'Abundis', 'Schacherer',
49 'Gleaves', 'Spiva', 'Rockefeller', 'Clauss', 'Kennerly',
50 'Wiersma', 'Holdman', 'Lofthouse', 'Tatman', 'Clear', 'Urman',
51 'Sayler', 'Averitt', 'Poage', 'Gayer', 'Bluford', 'Mchargue',
52 'Gustavson', 'Hartson', 'Summitt', 'Vrabel', 'Mcconn', 'Pullman',
53 'Bueche', 'Katzer', 'Belmonte', 'Kwak', 'Jobin', 'Dziedzic',
54 'Devalle', 'Buchannon', 'Schreier', 'Pollman', 'Pompey',
55 'Snover', 'Evilias'
56 ])
57});