[BUGFIX] js errors
This commit is contained in:
parent
670351397e
commit
74c0db4e75
@ -20,6 +20,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
|
|
||||||
function selectBoatChange() {
|
function selectBoatChange() {
|
||||||
const boatSelect = <HTMLSelectElement>document.querySelector('#boat_id');
|
const boatSelect = <HTMLSelectElement>document.querySelector('#boat_id');
|
||||||
|
|
||||||
|
if(boatSelect) {
|
||||||
const boatChoice = new Choices(boatSelect, {
|
const boatChoice = new Choices(boatSelect, {
|
||||||
loadingText: 'Wird geladen...',
|
loadingText: 'Wird geladen...',
|
||||||
noResultsText: 'Keine Ergebnisse gefunden',
|
noResultsText: 'Keine Ergebnisse gefunden',
|
||||||
@ -50,8 +52,10 @@ function selectBoatChange() {
|
|||||||
} as any);
|
} as any);
|
||||||
|
|
||||||
choiceObjects[boatSelect.id] = boatChoice;
|
choiceObjects[boatSelect.id] = boatChoice;
|
||||||
|
}
|
||||||
|
|
||||||
const shipmasterSelect = <HTMLSelectElement>document.querySelector('#shipmaster');
|
const shipmasterSelect = <HTMLSelectElement>document.querySelector('#shipmaster');
|
||||||
|
if(shipmasterSelect) {
|
||||||
const shipmasterChoice = new Choices(shipmasterSelect, {
|
const shipmasterChoice = new Choices(shipmasterSelect, {
|
||||||
loadingText: 'Wird geladen...',
|
loadingText: 'Wird geladen...',
|
||||||
noResultsText: 'Keine Ergebnisse gefunden',
|
noResultsText: 'Keine Ergebnisse gefunden',
|
||||||
@ -61,6 +65,7 @@ function selectBoatChange() {
|
|||||||
|
|
||||||
choiceObjects[shipmasterSelect.id] = shipmasterChoice;
|
choiceObjects[shipmasterSelect.id] = shipmasterChoice;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function setMaxAmountRowers(rowers: number){
|
function setMaxAmountRowers(rowers: number){
|
||||||
let curSelection = choiceObjects['newrower'].getValue(true);
|
let curSelection = choiceObjects['newrower'].getValue(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user