public onFileUpload(args: any) {
let li: HTMLElement = (this.uploadObj as any).uploadWrapper.querySelector('[data-file-name="' + args.file.name + '"]');
let progressValue: number = Math.round((args.e.loaded / args.e.total) * 100);
li.getElementsByTagName('progress')[0].value = progressValue;
li.getElementsByClassName('percent')[0].textContent = progressValue.toString() + " %";
}
public onuploadSuccess(args: any) {
if (args.operation === 'remove') {
let height: string = document.getElementById('dropArea').style.height;
height = (parseInt(height) - 40) + 'px';
document.getElementById('dropArea').style.height = height;
} else {
let li: HTMLElement = (this.uploadObj as any).uploadWrapper.querySelector('[data-file-name="' + args.file.name + '"]');
let progressBar: HTMLElement = li.getElementsByTagName('progress')[0];
progressBar.classList.add('e-upload-success');
li.getElementsByClassName('percent')[0].classList.add('e-upload-success');
let height: string = document.getElementById('dropArea').style.height;
document.getElementById('dropArea').style.height = parseInt(height) - 15 + 'px';
}
|