mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(dom) Loader: mv percent, count, msg to if
This commit is contained in:
parent
5a52847ef8
commit
c0b6c47939
1 changed files with 6 additions and 4 deletions
|
|
@ -660,12 +660,14 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
xhr.responseType = p.responseType;
|
||||
|
||||
Events.add('progress', function(event) {
|
||||
var percent = (event.loaded / event.total) * 100,
|
||||
count = Math.round(percent),
|
||||
msg = lType + ' ' + p.url + ': ' + percent + '%';
|
||||
var percent, count, msg;
|
||||
|
||||
if (event.lengthComputable)
|
||||
if (event.lengthComputable) {
|
||||
percent = (event.loaded / event.total) * 100,
|
||||
count = Math.round(percent),
|
||||
msg = lType + ' ' + p.url + ': ' + count + '%';
|
||||
Util.log(msg);
|
||||
}
|
||||
|
||||
}, xhr.upload);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue