42
|
1 |
/**
|
|
2 |
* SAPI Sample Data - Contacts
|
|
3 |
*/
|
|
4 |
|
|
5 |
(function(){
|
|
6 |
|
|
7 |
|
|
8 |
var data_contacts = [{
|
|
9 |
"id": "",
|
|
10 |
"FirstName": {
|
|
11 |
"Label": "First name",
|
|
12 |
"Value": "Alice"
|
|
13 |
},
|
|
14 |
"LastName": {
|
|
15 |
"Label": "Last name",
|
|
16 |
"Value": "Moller"
|
|
17 |
},
|
|
18 |
"LandPhoneGen": {
|
|
19 |
"Label": "Telephone",
|
|
20 |
"Value": "0230328732"
|
|
21 |
},
|
|
22 |
"SyncClass": {
|
|
23 |
"Label": "Synchronisation",
|
|
24 |
"Value": "private"
|
|
25 |
}
|
|
26 |
}, {
|
|
27 |
"id": "",
|
|
28 |
"FirstName": {
|
|
29 |
"Label": "First name",
|
|
30 |
"Value": "Amy"
|
|
31 |
},
|
|
32 |
"LastName": {
|
|
33 |
"Label": "Last name",
|
|
34 |
"Value": "Kammer"
|
|
35 |
},
|
|
36 |
"LandPhoneGen": {
|
|
37 |
"Label": "Telephone",
|
|
38 |
"Value": "0492303652"
|
|
39 |
},
|
|
40 |
"SyncClass": {
|
|
41 |
"Label": "Synchronisation",
|
|
42 |
"Value": "private"
|
|
43 |
}
|
|
44 |
}, {
|
|
45 |
"id": "",
|
|
46 |
"SyncClass": {
|
|
47 |
"Label": "Synchronisation",
|
|
48 |
"Value": "private"
|
|
49 |
},
|
|
50 |
"LastName": {
|
|
51 |
"Label": "Last name",
|
|
52 |
"Value": "Bierman"
|
|
53 |
},
|
|
54 |
"FirstName": {
|
|
55 |
"Label": "First name",
|
|
56 |
"Value": "Michael"
|
|
57 |
},
|
|
58 |
"MobilePhoneGen": {
|
|
59 |
"Label": "Mobile",
|
|
60 |
"Value": "4084256071"
|
|
61 |
}
|
|
62 |
}, {
|
|
63 |
"id": "",
|
|
64 |
"FirstName": {
|
|
65 |
"Label": "First name",
|
|
66 |
"Value": "Ralph"
|
|
67 |
},
|
|
68 |
"LastName": {
|
|
69 |
"Label": "Last name",
|
|
70 |
"Value": "Jacmor"
|
|
71 |
},
|
|
72 |
"LandPhoneGen": {
|
|
73 |
"Label": "Telephone",
|
|
74 |
"Value": "0432443343"
|
|
75 |
},
|
|
76 |
"SyncClass": {
|
|
77 |
"Label": "Synchronisation",
|
|
78 |
"Value": "private"
|
|
79 |
}
|
|
80 |
}, {
|
|
81 |
"id": "",
|
|
82 |
"FirstName": {
|
|
83 |
"Label": "First name",
|
|
84 |
"Value": "Robert"
|
|
85 |
},
|
|
86 |
"LastName": {
|
|
87 |
"Label": "Last name",
|
|
88 |
"Value": "Richards"
|
|
89 |
},
|
|
90 |
"LandPhoneGen": {
|
|
91 |
"Label": "Telephone",
|
|
92 |
"Value": "+4443433434"
|
|
93 |
},
|
|
94 |
"SyncClass": {
|
|
95 |
"Label": "Synchronisation",
|
|
96 |
"Value": "private"
|
|
97 |
}
|
|
98 |
}, {
|
|
99 |
"id": "",
|
|
100 |
"FirstName": {
|
|
101 |
"Label": "First name",
|
|
102 |
"Value": "Ursula"
|
|
103 |
},
|
|
104 |
"LastName": {
|
|
105 |
"Label": "Last name",
|
|
106 |
"Value": "West"
|
|
107 |
},
|
|
108 |
"LandPhoneGen": {
|
|
109 |
"Label": "Telephone",
|
|
110 |
"Value": "0213443434"
|
|
111 |
},
|
|
112 |
"SyncClass": {
|
|
113 |
"Label": "Synchronisation",
|
|
114 |
"Value": "private"
|
|
115 |
}
|
|
116 |
}];
|
|
117 |
|
|
118 |
|
|
119 |
var data_groups = [{
|
|
120 |
"id": "",
|
|
121 |
"GroupLabel": "TestGroupName"
|
|
122 |
}, {
|
|
123 |
"id": "",
|
|
124 |
"GroupLabel": "Silver club #5488",
|
|
125 |
"Contents": ["", "", "", "", "", ""]
|
|
126 |
}, {
|
|
127 |
"id": "",
|
|
128 |
"GroupLabel": "The buddies #9926"
|
|
129 |
}, {
|
|
130 |
"id": "",
|
|
131 |
"GroupLabel": "Football team #5940",
|
|
132 |
"Contents": ["", ""]
|
|
133 |
}, {
|
|
134 |
"id": "",
|
|
135 |
"GroupLabel": "Science group #2742",
|
|
136 |
"Contents": ["", "", "", "", "", ""]
|
|
137 |
}, {
|
|
138 |
"id": "",
|
|
139 |
"GroupLabel": "Rockers #3062",
|
|
140 |
"Contents": ["", "", "", "", "", ""]
|
|
141 |
}];
|
|
142 |
|
|
143 |
|
|
144 |
var data_database = [{
|
|
145 |
"DBUri": "cntdb://c:contacts.cdb"
|
|
146 |
},{
|
|
147 |
"DBUri": "sim://global_adn"
|
|
148 |
}];
|
|
149 |
|
|
150 |
|
|
151 |
/**
|
|
152 |
* register data!
|
|
153 |
*/
|
|
154 |
device.implementation.loadData('Service.Contact', 'Contact', data_contacts);
|
|
155 |
device.implementation.loadData('Service.Contact', 'Group', data_groups);
|
|
156 |
device.implementation.loadData('Service.Contact', 'Database', data_database);
|
|
157 |
|
|
158 |
})()
|