Pārlūkot izejas kodu

progress bar

master
Pascal Gloor pirms 5 gadiem
vecāks
revīzija
db524719f0
2 mainītis faili ar 37 papildinājumiem un 24 dzēšanām
  1. 23
    23
      www/index.html
  2. 14
    1
      www/js/autodoc.js

+ 23
- 23
www/index.html Parādīt failu

@@ -108,40 +108,40 @@
<div class="progress-bar progress-bar-striped progress-bar-animated"></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 class="col">
<div class="lead">Upload Status</div>

</div>
</div>

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

<!-- Tags -->
<div class="container d-none" id="autodoc_tab_tags">
<h3>tags</h3>
</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>

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

+ 14
- 1
www/js/autodoc.js Parādīt failu

@@ -234,7 +234,20 @@ function handle_uploads(ev) {
function upload_status() {
$.each(temp.upload, function(id, file) {
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);
}

Notiek ielāde…
Atcelt
Saglabāt