ocr fix, redirect zu dash

This commit is contained in:
LukasNowy 2019-01-29 20:44:10 +01:00
parent 05568120bf
commit 5e970ade1a
3 changed files with 29 additions and 2 deletions

View File

@ -8,6 +8,7 @@ $(document).ready(function() {
dismissible: false
});
$('.materialboxed').materialbox();
$('.fixed-action-btn').floatingActionButton();
@ -23,6 +24,7 @@ $(document).ready(function() {
$("#modal1").modal("open");
$(".btn-analyze").click(function() {
analyzeUploaded();
});
@ -55,7 +57,7 @@ function movePurchases(text) {
},
success(result){
console.log(result);
alert("Done");
window.location.href = "/dash/" + idtoken
},
error(err){
console.error("Error: " + err);
@ -76,6 +78,9 @@ $(document).on("click", ".btndash", function() {
});
function analyzeUploaded() {
$("#modalEND").modal("open");
var img = document.getElementById("blah");
Tesseract.recognize(img).progress((progress) => {

View File

@ -72,3 +72,11 @@ html, body {
.btn-choose {
width: 100%;
}
.progress .indeterminate {
background-color: #f4511e;
}
.progress {
background-color: #f8cfc3;
}

View File

@ -55,7 +55,7 @@
<div class="file-path-wrapper">
</div>
</div>
<center><img id="blah" src="#" alt="your image" /></center>
<center><img id="blah" src="#" alt="" /></center>
</div>
<center><button class="btn waves-effect waves-light deep-orange darken-1 disabled btn-analyze " type="submit" name="action">Continue<i class="material-icons right">send</i></button></center>
@ -123,6 +123,20 @@
</div>
</div>
<!-- Modal Structure PRELOADER END-->
<div id="modalEND" class="modal">
<div class="modal-content">
<center> <div class="progress">
<div class="indeterminate"></div>
</div>
</center>
<p>Loading ...</p>
</div>
</div>
<script src="/ocrscan/cam.js"></script>
<script src="/ocrscan/ocrscan.js"></script>
<script src="/ocrscan/fileuploads.js"></script>