add function syntax to sveltestrap onclick events and others

- fixes event_handler_invalid svelte warning and blockage
This commit is contained in:
Christoph Kluge
2025-02-04 12:13:06 +01:00
parent 2b23003556
commit aaafde4a7c
12 changed files with 18 additions and 18 deletions

View File

@@ -107,7 +107,7 @@
placeholder={presetProject ? `Find ${mode} in ${scrambleNames ? scramble(presetProject) : presetProject} ...` : `Find ${mode} ...`}
/>
{#if presetProject}
<Button title="Reset Project" on:click={resetProject}
<Button title="Reset Project" on:click={() => resetProject}
><Icon name="arrow-counterclockwise" /></Button
>
{/if}

View File

@@ -76,7 +76,7 @@
<a href="/monitoring/job/{job.id}" target="_blank">{job.jobId}</a>
({job.cluster})
</span>
<Button id={`${job.cluster}-${job.jobId}-clipboard`} outline color="secondary" size="sm" on:click={clipJobId(job.jobId)} >
<Button id={`${job.cluster}-${job.jobId}-clipboard`} outline color="secondary" size="sm" on:click={() => clipJobId(job.jobId)} >
{#if displayCheck}
<Icon name="clipboard2-check-fill"/>
{:else}

View File

@@ -29,13 +29,13 @@
<div class="cc-pagination-right">
{#if !backButtonDisabled}
<button aria-label="page-reset" class="reset nav" type="button"
on:click|preventDefault="{reset}"></button>
on:click|preventDefault={() => reset}></button>
<button aria-label="page-back" class="left nav" type="button"
on:click|preventDefault="{() => { page -= 1; }}"></button>
on:click|preventDefault={() => { page -= 1; }}></button>
{/if}
{#if !nextButtonDisabled}
<button aria-label="page-up" class="right nav" type="button"
on:click|preventDefault="{() => { page += 1; }}"></button>
on:click|preventDefault={() => { page += 1; }}></button>
{/if}
</div>
</div>

View File

@@ -88,7 +88,7 @@
</ListGroup>
</ModalBody>
<ModalFooter>
<Button color="primary" on:click={closeAndApply}>Close & Apply</Button>
<Button color="primary" on:click={() => closeAndApply}>Close & Apply</Button>
<Button color="secondary" on:click={() => (isOpen = !isOpen)}>Close</Button>
</ModalFooter>
</Modal>

View File

@@ -188,7 +188,7 @@
</ListGroup>
</ModalBody>
<ModalFooter>
<Button color="primary" on:click={closeAndApply}>Close & Apply</Button>
<Button color="primary" on:click={() => closeAndApply}>Close & Apply</Button>
<Button color="secondary" on:click={() => (isOpen = !isOpen)}>Cancel</Button>
</ModalFooter>
</Modal>