Browse Source

progress bar

master
Pascal Gloor 5 years ago
parent
commit
db524719f0
2 changed files with 37 additions and 24 deletions
  1. 23
    23
      www/index.html
  2. 14
    1
      www/js/autodoc.js

+ 23
- 23
www/index.html View File

<div class="progress-bar progress-bar-striped progress-bar-animated"></div> <div class="progress-bar progress-bar-striped progress-bar-animated"></div>
</div> </div>
</div> </div>
<h3>upload</h3>
<div class="row">
<div class="col">

<div class="lead">Upload Zone</div>

<div class="text-center autodoc_upload_zone">
Drag & Drop files (png, jpeg, pdf) into this zone to attach them to a single new document<br />
Files can be uploaded at once or separately. A long as the page is not refreshed or the new document
button
is pushed, they will all be attached to the same document
</div>
<h3>upload</h3>
<div class="row">
<div class="col">


<div class="lead">Upload Zone</div>


<div class="text-center autodoc_upload_zone">
Drag & Drop files (png, jpeg, pdf) into this zone to attach them to a single new document<br />
Files can be uploaded at once or separately. A long as the page is not refreshed or the new document
button
is pushed, they will all be attached to the same document
</div> </div>


<div class="col">
<div class="lead">Upload Status</div>


</div>
</div> </div>


<div class="col">
<div class="lead">Upload Status</div>
<div class="autodoc_upload_status"></div>
</div>
</div> </div>
</div>


<!-- Tags -->
<div class="container d-none" id="autodoc_tab_tags">
<h3>tags</h3>
</div> </div>
</div>


<!-- Search -->
<div class="container d-none" id="autodoc_tab_search">
<h3>search</h3>
</div>
<!-- Tags -->
<div class="container d-none" id="autodoc_tab_tags">
<h3>tags</h3>
</div>

<!-- Search -->
<div class="container d-none" id="autodoc_tab_search">
<h3>search</h3>
</div>
</div> </div>


<footer class="fixed-bottom page-footer font-small bg-dark"> <footer class="fixed-bottom page-footer font-small bg-dark">

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

function upload_status() { function upload_status() {
$.each(temp.upload, function(id, file) { $.each(temp.upload, function(id, file) {
var obj = $(".autodoc_template_progress").children(); var obj = $(".autodoc_template_progress").children();
console.log(obj);
$(obj).children().html(file.name);
$(obj).children().css('width', "50%");
if ( file.progress==1) {
if ( file.error ) {
$(obj).children().html(file.name + ': ' + file.error);
$(obj).children().addClass('bg-danger');
$(obj).children().css('width', "100%");
}
else {
$(obj).children().addClass('bg-success');
$(obj).children().css('width', "100%");
}
}
$('.autodoc_upload_status').append(obj);
}); });
// setTimeout(upload_status, 1000); // setTimeout(upload_status, 1000);
} }

Loading…
Cancel
Save