projects
/
Plinn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c00b819
)
Introduction du callback « progressHandlerCB ».
author
Benoît Pin
<pin@cri.ensmp.fr>
Tue, 13 Aug 2013 10:04:25 +0000
(12:04 +0200)
committer
Benoît Pin
<pin@cri.ensmp.fr>
Wed, 14 Aug 2013 10:33:13 +0000
(12:33 +0200)
skins/fileupload.js
patch
|
blob
|
history
diff --git
a/skins/fileupload.js
b/skins/fileupload.js
index
0aebb3e
..
318f059
100644
(file)
--- a/
skins/fileupload.js
+++ b/
skins/fileupload.js
@@
-111,12
+111,15
@@
DDFileUploaderBase.prototype.uploadCompleteHandler = function(req) {
this.uploadQueueLoadNext();
};
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;
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);
}
};
}
};