-
Notifications
You must be signed in to change notification settings - Fork 15
/
todoApp.js
executable file
·27 lines (27 loc) · 1.03 KB
/
todoApp.js
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
define(["dojox/mobile/ProgressIndicator"], function(ProgressIndicator){
return function(){
// the default select_item is 0, or will throw an error if directly transition to #details,EditTodoItem view
this.selected_item = 0;
this.selected_configuration_item = 0;
this.progressIndicator = null;
/*
* show or hide global progress indicator
*/
this.showProgressIndicator = function(show){
if(!this.progressIndicator){
this.progressIndicator = ProgressIndicator.getInstance({removeOnStop:false, startSpinning:true, size:40, center:true, interval:30});
// TODO: use dojo.body will throw no appendChild method error.
var body = document.getElementsByTagName("body")[0];
body.appendChild(this.progressIndicator.domNode);
this.progressIndicator.domNode.style.zIndex = 999;
}
if(show){
this.progressIndicator.domNode.style.visibility = "visible";
this.progressIndicator.start();
}else{
this.progressIndicator.stop();
this.progressIndicator.domNode.style.visibility = "hidden";
}
}
};
});