X-Git-Url: https://scm.cri.mines-paristech.fr/git/Portfolio.git/blobdiff_plain/fcf65c49c21cf42f3628500e8713efe8e0dfb5c8..b2f7492bbdef474919330ff5a3404b8795036314:/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); } };