diff --git a/frontend/main.ts b/frontend/main.ts index 81a845d..4cd5700 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -84,7 +84,6 @@ function reloadPage() { } function setMaxAmountRowers(name: string, rowers: number) { - console.log("called fct: name="+name+"; rowers="+rowers); if(choiceObjects[name]) { choiceObjects[name].removeActiveItems(-1); //let curSelection = choiceObjects[name].getValue(true); @@ -131,7 +130,6 @@ function setMaxAmountRowers(name: string, rowers: number) { // } //} } - console.log(choiceObjects["newrower"].config.maxItemCount); } function initBoatActions() { @@ -180,32 +178,10 @@ function initNewChoice(select: HTMLInputElement) { noChoicesText: 'Keine Ergebnisse gefunden', itemSelectText: 'Zum Auswählen klicken', placeholderValue: 'Ruderer auswählen', - maxItemCount: -1, //TODO + maxItemCount: select.dataset.seats, maxItemText: (maxItemCount) => { return `Nur ${maxItemCount} Ruderer können hinzugefügt werden`; }, - callbackOnCreateTemplates: function () { - return { - option: ({ label, value, customProperties, active, disabled, }: any) => { - const opt: HTMLOptionElement = Choices.defaults.templates.option.call( - this, - { label, value, customProperties, active, disabled } - ); - - // We get the original