{
	"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"
				}
			}
		}
	}
}
