disable reload on ergo page; allow camera capture
This commit is contained in:
parent
f7b24b4d50
commit
50de29284f
@ -68,19 +68,21 @@ function selectBoatChange() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function reloadPage() {
|
function reloadPage() {
|
||||||
let pageTitle = document.title;
|
if (!window.location.href.includes("ergo")){
|
||||||
let attentionMessage = 'Riemen- und Dollenbruch';
|
let pageTitle = document.title;
|
||||||
|
let attentionMessage = 'Riemen- und Dollenbruch';
|
||||||
|
|
||||||
document.addEventListener('visibilitychange', function() {
|
document.addEventListener('visibilitychange', function() {
|
||||||
let isPageActive = !document.hidden;
|
let isPageActive = !document.hidden;
|
||||||
|
|
||||||
if(!isPageActive){
|
if(!isPageActive){
|
||||||
document.title = attentionMessage;
|
document.title = attentionMessage;
|
||||||
} else {
|
} else {
|
||||||
document.title = pageTitle;
|
document.title = pageTitle;
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setMaxAmountRowers(name: string, rowers: number) {
|
function setMaxAmountRowers(name: string, rowers: number) {
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
|
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
|
||||||
<input type="file" name="proof" class="input">
|
<input type="file" name="proof" class="input" accept="image/*" capture="camera">
|
||||||
<input type="submit" value="Speichern" class="btn btn-primary w-full col-span-4 m-auto"/>
|
<input type="submit" value="Speichern" class="btn btn-primary w-full col-span-4 m-auto"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
|
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
|
||||||
<input type="file" name="proof" class="input">
|
<input type="file" name="proof" class="input" accept="image/*" capture="camera">
|
||||||
<input type="submit" value="Speichern" class="btn btn-primary w-full col-span-4 m-auto"/>
|
<input type="submit" value="Speichern" class="btn btn-primary w-full col-span-4 m-auto"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user