X-Git-Url: https://scm.cri.mines-paristech.fr/git/Plinn.git/blobdiff_plain/c00b819ea88b5055e4fd8bc94d7ee6ea7d02ad49..bb34b7f0c5ace769d9f91ab5c90e5a10b2dfd1fe:/skins/fileupload.js diff --git a/skins/fileupload.js b/skins/fileupload.js index 0aebb3e..318f059 100644 --- a/skins/fileupload.js +++ b/skins/fileupload.js @@ -111,12 +111,15 @@ DDFileUploaderBase.prototype.uploadCompleteHandler = function(req) { this.uploadQueueLoadNext(); }; +DDFileUploaderBase.prototype.progressHandlerCB = function(progress) { + // To be implemented by descendant. + // 0 <= progress <= 1 +}; + DDFileUploaderBase.prototype.progressHandler = function(evt) { if (evt.lengthComputable) { var progress = evt.loaded / evt.total; - this.updateProgressBar(progress); - var currentOpacity = this.previewImg.style.opacity; - this.previewImg.style.opacity = Math.max(currentOpacity, progress); + this.progressHandlerCB(progress); } };