forked from cjolif/dojo-todo-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.json
executable file
·231 lines (211 loc) · 7.86 KB
/
config.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
{
"id": "todoApp",
"name": "ToDo App",
"description": "This is a ToDo sample application based on the Dojo Toolkit and provided under Dojo license.",
"splash": "splash",
// Dependencies, modules and controllers are loaded using the Dojo AMD loader.
// This parameter allows to configure the loader itself and specify for example where custom modules can be found.
"loaderConfig": {
"paths": {
"todoApp": "../demos/todoApp"
}
},
// Array of AMD modules identifiers. When defined at the top level dependencies of the dojox/app application.
// These could also be added to the define for the app, for example they could be added in todoApp.js
// When defined at view level, dependencies for the view.
"dependencies": [
"dojox/mvc/at",
"dojox/mobile/_base",
"dojox/mobile/compat",
"dojox/mobile/TabBar",
"dojox/mobile/RoundRect",
"dojox/mobile/TabBarButton",
"dojox/mobile/ToolBarButton",
"dojox/mobile/TextBox",
"dojox/mobile/TextArea",
"dojox/mobile/CheckBox",
"dojox/mobile/ExpandingTextArea",
"dojox/mobile/Button",
"dojox/mobile/RoundRect",
"dojox/mobile/Heading",
"dojox/mobile/ListItem",
"dojox/mobile/RoundRectList",
"dojox/mobile/RoundRectCategory",
"dojox/mobile/Switch",
"dojox/mobile/SimpleDialog",
"dojox/mobile/DatePicker",
"dojox/mobile/Opener",
"dojo/date/stamp",
"dojox/app/widgets/Container",
"dojo/store/Memory",
"dojo/data/ItemFileWriteStore",
"dojo/store/DataStore",
"dojox/app/utils/mvcModel",
"dojox/mvc/EditStoreRefListController",
"dojox/mvc/Repeat",
"dojox/mvc/WidgetList",
"dojox/mvc/Group",
"dojox/mvc/Output"
],
// Modules for the application. They are basically used as the second
// array of mixins in a dojo.declare(). Modify the top level behavior
// of the application, how it processes the config or any other life cycle
// by creating and including one or more of these
"modules": [
"todoApp/todoApp"
],
// Array of AMD modules identifiers. Controllers for the application. All the controllers defined here will be
// loaded during application startup to respond to application events and controller the application logic.
"controllers": [
"dojox/app/controllers/Load",
"dojox/app/controllers/Transition",
"dojox/app/controllers/Layout"
],
// Dojo stores which are used by dojox/app to setup data models. A store item is an object with a
// a type and a params property. The type property is the AMD module identifier for the store class to be
// instantiated. The content of the params property is passed to the store class constructor to build an
// instance.
"stores": {
"listsDataStore":{
"type": "dojo/data/ItemFileWriteStore",
"params": {
"url": "./resources/data/lists.json"
}
},
"allitemlistStore":{
"type": "dojo/data/ItemFileWriteStore",
// use has test for ios to use emoji
"params": {
"url": "./resources/data/all-items.json"
},
"has" : {
"ios" : {
"params": {
"url": "./resources/data/all-items-emoji.json"
}
}
}
}
},
// Models and their instantiation parameters. A model item is an object with three properties: the
// model type, the modelLoader and the params. The modelLoader property defines whether an MVC or a
// simple model must be loaded. The type property defines which class must be used for that model using
// an AMD module identifier and finally the params property content is passed to the model class
// constructor to build an instance.
"models": {
"listsmodel": {
"modelLoader": "dojox/app/utils/mvcModel",
"type": "dojox/mvc/EditStoreRefListController",
"params":{
"datastore": {"$ref":"#stores.listsDataStore"}
}
},
"allitemlistmodel": {
"modelLoader": "dojox/app/utils/mvcModel",
"type": "dojox/mvc/EditStoreRefListController",
"params":{
"datastore": {"$ref":"#stores.allitemlistStore"}
}
}
},
//The name(s) of the view(s) to load when the application is initialized.
"defaultView": "items,ViewListTodoItemsByPriority",
"has" : {
"!phone" : {
//template: HTML file. When defined at application level defines the application root template. When defined
//at view level defined the view template.
"template": "todoApp/tablet/ViewTodoLists.html",
"controller": "todoApp/tablet/ViewTodoLists"
},
"ie9orLess" : {
"controllers": [
"dojox/app/controllers/HistoryHash"
]
},
"!ie9orLess" : {
"controllers": [
"dojox/app/controllers/History"
]
}
},
//defaultTransition: The default animation type for the view transition.
//the defaultTransition is only used if transition is not set in the config and the transition is not set or
//defaulted on the transitionEvent
"defaultTransition": "slide",
//transition: The animation type to use for all view transitions.
// if a transition is set on a view or parent it will override the transition set on the transitionEvent or the defaultTransition in the config.
//"transition": "slide",
//views: The children views of an application or of a view. Dependencies may be defined on views for
//optimization and organization purposes. Models might also be defined on views if they are view-specific
//Finally a view item as three additional properties: transition for specific view transitions, template for
//defining the view rendering and finally controller to provide an AMD module to be mixed into the view to
//control it. AMD modules identifiers starting with “.” will be resolved relative to the application root. All other
//modules identifiers will be resolved according to the Dojo AMD loader rules and in particular with respect
//to its configuration provided as part of the loaderConfig attribute. If you do not want a controller
// module at all you should not specify one, setting it to none does not work for 1.9.
"views": {
"configuration": {
"defaultView": "SelectTodoList",
"defaultTransition": "slide",
"views": {
"SelectTodoList": {
"template": "todoApp/configuration/SelectTodoList.html",
"controller": "todoApp/configuration/SelectTodoList.js"
},
"ModifyTodoLists": {
"template": "todoApp/configuration/ModifyTodoLists.html",
"controller": "todoApp/configuration/ModifyTodoLists.js"
},
"EditTodoList": {
"template": "todoApp/configuration/EditTodoList.html",
"controller": "todoApp/configuration/EditTodoList.js"
}
}
},
//items view, include ViewListTodoItemsByPriority view and ViewAllTodoItemsByDate view
"items": {
"template": "todoApp/items/items.html",
"controller": "todoApp/items/items.js",
"defaultView": "ViewListTodoItemsByPriority",
"defaultTransition": "slide",
//the views available to this view
"views": {
"ViewListTodoItemsByPriority":{
"template": "todoApp/items/ViewListTodoItemsByPriority.html",
"controller": "todoApp/items/ViewListTodoItemsByPriority.js"
},
"ViewAllTodoItemsByDate":{
"template": "todoApp/items/ViewAllTodoItemsByDate.html",
"controller": "todoApp/items/ViewAllTodoItemsByDate.js"
}
}
},
//details view, include list view and date view
"details": {
"defaultView": "EditTodoItem",
"defaultTransition": "slide",
"views": {
"EditTodoItem":{
"template": "todoApp/details/EditTodoItem.html",
"controller": "todoApp/details/EditTodoItem.js"
},
"EditItemRepeat":{
"template": "todoApp/details/EditItemRepeat.html",
"controller": "todoApp/details/EditItemRepeat.js"
},
"EditItemRemindMe":{
"template": "todoApp/details/EditItemRemindMe.html",
"controller": "todoApp/details/EditItemRemindMe.js"
},
"EditItemPriority":{
"template": "todoApp/details/EditItemPriority.html",
"controller": "todoApp/details/EditItemPriority.js"
},
"EditItemList":{
"template": "todoApp/details/EditItemList.html",
"controller": "todoApp/details/EditItemList.js"
}
}
}
}
}