use static js
parent
dcf78bb88d
commit
fa1e988344
|
@ -1,11 +0,0 @@
|
|||
function setOnchange() {
|
||||
let imgPreview = document.getElementById('img-preview');
|
||||
let imgUpload = document.getElementById('img-upload');
|
||||
imgUpload.onchange = event => {
|
||||
const [file] = imgUpload.files;
|
||||
if (file) {
|
||||
console.log(file)
|
||||
imgPreview.src = URL.createObjectURL(file);
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
function saveCsv(csvString) {
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
let imgPreview = document.getElementById('img-preview');
|
||||
let imgUpload = document.getElementById('img-upload');
|
||||
imgUpload.onchange = event => {
|
||||
const [file] = imgUpload.files;
|
||||
if (file) {
|
||||
console.log(file)
|
||||
imgPreview.src = URL.createObjectURL(file);
|
||||
}
|
||||
};
|
|
@ -2,6 +2,8 @@
|
|||
<head>
|
||||
<title>Pyrometry Application</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='app.css') }}">
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar">
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/ratio_pyro" method="POST" enctype="multipart/form-data">
|
||||
<h2>Ratio Pyrometry Interface</h2>
|
||||
|
@ -58,17 +62,7 @@
|
|||
<input type="submit" value="Generate Heatmap"/>
|
||||
</form>
|
||||
|
||||
<!-- <script src="/img_preview.js" onload="setOnChange()"></script> -->
|
||||
<script>
|
||||
let imgPreview = document.getElementById('img-preview');
|
||||
let imgUpload = document.getElementById('img-upload');
|
||||
imgUpload.onchange = event => {
|
||||
const [file] = imgUpload.files;
|
||||
if (file) {
|
||||
console.log(file)
|
||||
imgPreview.src = URL.createObjectURL(file);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<!-- Image Preview -->
|
||||
<script src="/s/js/img_preview.js"></script>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -14,26 +14,25 @@
|
|||
<label for="area_threshold">Area threshold (to remove dust particles) in px</label>
|
||||
<input type="number" name="area_threshold" value="250"/>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<label for="min_display_threshold">Minimum display threshold (in px)</label>
|
||||
<input type="number" name="min_display_threshold" value="300"/>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<label for="min_display_threshold">Page size</label>
|
||||
<input type="number" name="paper_width" value="8.5"/>
|
||||
X
|
||||
<input type="number" name="paper_height" value="11"/> inches
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<br>
|
||||
<input type="submit" value="Generate Projected Sizes"/>
|
||||
</form>
|
||||
|
||||
<!-- <script src="/img_preview.js" onload="setOnChange()"></script> -->
|
||||
<script>
|
||||
let imgPreview = document.getElementById('img-preview');
|
||||
let imgUpload = document.getElementById('img-upload');
|
||||
imgUpload.onchange = event => {
|
||||
const [file] = imgUpload.files;
|
||||
if (file) {
|
||||
console.log(file)
|
||||
imgPreview.src = URL.createObjectURL(file);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<!-- Image Preview -->
|
||||
<script src="/s/js/img_preview.js"></script>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue