Introduction du callback « progressHandlerCB ».
[Portfolio.git] / skins / portfolio_upload.js
index c4b7982..c9c492a 100644 (file)
@@ -44,6 +44,17 @@ DDImageUploader.prototype.handleFiles = function(files) {
        }
 };
 
+DDImageUploader.prototype.beforeUpload = function(slide) {
+       this.uploadedSlide = slide;
+       this.previewImg = slide.img;
+       this.progressBar = slide.progressBar;
+};
+
+DDImageUploader.prototype.progressHandlerCB = function(progress) {
+       this.updateProgressBar(progress);
+       var currentOpacity = this.previewImg.style.opacity;
+       this.previewImg.style.opacity = Math.max(currentOpacity, progress);
+};
 
 // Methods about preview queue.
 DDImageUploader.prototype.previewQueuePush = function(slide) {