Line | |
---|
1 | require(["dojo/_base/window","dojox/app/main", "dojox/json/ref", "dojo/text!./config.json", "dojo/sniff"], |
---|
2 | function(win, Application, jsonRef, config, has){ |
---|
3 | win.global.modelApp = {}; |
---|
4 | modelApp.listData = { |
---|
5 | identifier: "id", |
---|
6 | 'items':[{ |
---|
7 | "id": "item1", |
---|
8 | "label": "Chad Chapman", |
---|
9 | "rightIcon":"mblDomButtonBlueCircleArrow", |
---|
10 | "First": "Chad", |
---|
11 | "Last": "Chapman", |
---|
12 | "Location": "CA", |
---|
13 | "Office": "1278", |
---|
14 | "Email": "c.c@test.com", |
---|
15 | "Tel": "408-764-8237", |
---|
16 | "Fax": "408-764-8228" |
---|
17 | }, { |
---|
18 | "id": "item2", |
---|
19 | "label": "Irene Ira", |
---|
20 | "rightIcon":"mblDomButtonBlueCircleArrow", |
---|
21 | "First": "Irene", |
---|
22 | "Last": "Ira", |
---|
23 | "Location": "NJ", |
---|
24 | "Office": "F09", |
---|
25 | "Email": "i.i@test.com", |
---|
26 | "Tel": "514-764-6532", |
---|
27 | "Fax": "514-764-7300" |
---|
28 | }, { |
---|
29 | "id": "item3", |
---|
30 | "label": "John Jacklin", |
---|
31 | "rightIcon":"mblDomButtonBlueCircleArrow", |
---|
32 | "First": "John", |
---|
33 | "Last": "Jacklin", |
---|
34 | "Location": "CA", |
---|
35 | "Office": "6701", |
---|
36 | "Email": "j.j@test.com", |
---|
37 | "Tel": "408-764-1234", |
---|
38 | "Fax": "408-764-4321" |
---|
39 | }] |
---|
40 | }; |
---|
41 | var cfg = jsonRef.fromJson(config); |
---|
42 | has.add("ie9orLess", has("ie") && (has("ie") <= 9)); |
---|
43 | cfg.controllers[2] = "dojox/app/controllers/Layout"; |
---|
44 | console.log("cfg.controllers[2] was set to Layout to force it to use Layout="+cfg.controllers[2]); |
---|
45 | Application(cfg); |
---|
46 | |
---|
47 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.