1)how can i add label to the upload control. The user want to have label next to the each button(Add files,upload, clear all)?
2)How can i highlight/change image/color the upload button when there are files that are selected but not uploaded yet so the user can know they still have file that need to be uploaded
3)can we have a overall progress bar for all the file ? for now i see there is a progress bar for each files but can we have a single progress bar for all the file in the select list? how can we do this?
can you elaborate some more on the 1st solution?
I’ve try setting the InnerHTML but it doesn’t show but in the source it’s there. Probably there are some css that i need to tinker with. Another solution that i just thought of is altering the button image itself since i see we can set the width for the button but i really don’t want to go there
I’ve tried the solution for item 2 and i think i can use this
Thanks
// classList is not supported by IE9 and lower
myForm.attachEvent("onUploadComplete",function(count){
for (i in myForm.getUploader('myFiles').buttons) {
myForm.getUploader('myFiles').buttons[i].classList.remove("newStyle1");
myForm.getUploader('myFiles').buttons[i].classList.add("newStyle");
//var newBrowse = document.createElement("div");.............your code for div
}
});
myForm.attachEvent("onFileAdd",function(realName){
for (i in myForm.getUploader('myFiles').buttons) {
myForm.getUploader('myFiles').buttons[i].classList.remove("newStyle");
myForm.getUploader('myFiles').buttons[i].classList.add("newStyle1");
//var newBrowse = document.createElement("div");.............your code for div
}
});
var loaded_size = 0, total_size = 0;
setTotalSize = function(file_loaded_size) {
loaded_size += file_loaded_size;
}
setInterval(function(){console.log('loaded ' + loaded_size + '; total ' + total_size + ' ' + Math.round(loaded_size*100/total_size) )}, 2000); // use own code. add .innerHTML in something with text (ex., 123222/33233443) or add graphic using css.
Find _doUploadFile function FOR UPLOADER in dhtmlx.js.
This function contents this._loader.upload.onprogress function.
After line with …Math.round(…)); call setTotalSize(e.loaded);