Browse Source

debug

master
Pascal Gloor 5 years ago
parent
commit
8f96963d82
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      www/js/autodoc.js

+ 5
- 1
www/js/autodoc.js View File

$.each(temp.upload, function(id, file) { $.each(temp.upload, function(id, file) {
console.log(id,file); console.log(id,file);
var obj = $(".autodoc_template_progress").children(); var obj = $(".autodoc_template_progress").children();
$(obj).children().html(file.name);
$(obj).children().html(file.obj.name);
$(obj).children().css('width', "50%"); $(obj).children().css('width', "50%");
if ( file.progress==1) { if ( file.progress==1) {
if ( file.error ) { if ( file.error ) {
$(obj).children().html(file.name + ': ' + file.error); $(obj).children().html(file.name + ': ' + file.error);
$(obj).children().addClass('bg-danger'); $(obj).children().addClass('bg-danger');
$(obj).children().removeClass("progress-bar-animated");
$(obj).children().css('width', "100%"); $(obj).children().css('width', "100%");
} }
else { else {
finished=0; finished=0;
$(obj).children().addClass('bg-success'); $(obj).children().addClass('bg-success');
$(obj).children().css('width', "100%"); $(obj).children().css('width', "100%");
$(obj).children().removeClass("progress-bar-animated");

} }
} }
console.log(obj); console.log(obj);
$('.autodoc_upload_status').append(obj); $('.autodoc_upload_status').append(obj);
}); });
if ( !finished || temp.upload.length == 0 ) { if ( !finished || temp.upload.length == 0 ) {
console.log("status again");
setTimeout(upload_status, 1000); setTimeout(upload_status, 1000);
} }
} }

Loading…
Cancel
Save