source: [view]
if(!this.uploaderId && !this.uploader){
console.warn("uploaderId not passed to UploaderFileList");
}else if(this.uploaderId && !this.uploader){
this.uploader = dijit.byId(this.uploaderId);
}else if(this._upCheckCnt>4){
console.warn("uploader not found for ID ", this.uploaderId);
return;
}
if(this.uploader){
this.connect(this.uploader, "onChange", "_onUploaderChange");
this.connect(this.uploader, "reset", "reset");
this.connect(this.uploader, "onBegin", function(){
this.showProgress(true);
});
this.connect(this.uploader, "onProgress", "_progress");
this.connect(this.uploader, "onComplete", function(){
setTimeout(dojo.hitch(this, function(){
this.hideProgress(true);
}), 1250);
});
}else{
this._upCheckCnt++;
setTimeout(dojo.hitch(this, "setUploader"), 250);
}