You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.0 KiB
30 lines
1.0 KiB
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"; |
|
} |
|
|
|
} |
|
}; |
|
});
|
|
|