mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-27 05:49:04 +01:00
Omit submit on colorscheme selection: now updates directly on select
This commit is contained in:
parent
87ce3c3e8e
commit
d351a043c2
@ -129,7 +129,7 @@
|
|||||||
<Row cols={1} class="p-2 g-2">
|
<Row cols={1} class="p-2 g-2">
|
||||||
<!-- COLORSCHEME -->
|
<!-- COLORSCHEME -->
|
||||||
<Col><Card>
|
<Col><Card>
|
||||||
<form id="colorscheme-form" method="post" action="/api/configuration/" class="card-body" on:submit|preventDefault={() => handleSettingSubmit("#colorscheme-form", "cs")}>
|
<form id="colorscheme-form" method="post" action="/api/configuration/" class="card-body">
|
||||||
<!-- Svelte 'class' directive only on DOMs directly, normal 'class="xxx"' does not work, so style-array it is. -->
|
<!-- Svelte 'class' directive only on DOMs directly, normal 'class="xxx"' does not work, so style-array it is. -->
|
||||||
<CardTitle style="margin-bottom: 1em; display: flex; align-items: center;">
|
<CardTitle style="margin-bottom: 1em; display: flex; align-items: center;">
|
||||||
<div>Color Scheme for Timeseries Plots</div>
|
<div>Color Scheme for Timeseries Plots</div>
|
||||||
@ -143,9 +143,9 @@
|
|||||||
<th scope="col">{name}</th>
|
<th scope="col">{name}</th>
|
||||||
<td>
|
<td>
|
||||||
{#if rgbrow.join(',') == config.plot_general_colorscheme}
|
{#if rgbrow.join(',') == config.plot_general_colorscheme}
|
||||||
<input type="radio" name="value" value={JSON.stringify(rgbrow)} checked/>
|
<input type="radio" name="value" value={JSON.stringify(rgbrow)} checked on:click={() => handleSettingSubmit("#colorscheme-form", "cs")}/>
|
||||||
{:else}
|
{:else}
|
||||||
<input type="radio" name="value" value={JSON.stringify(rgbrow)}/>
|
<input type="radio" name="value" value={JSON.stringify(rgbrow)} on:click={() => handleSettingSubmit("#colorscheme-form", "cs")}/>
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -157,7 +157,6 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</tbody>
|
</tbody>
|
||||||
</Table>
|
</Table>
|
||||||
<Button color="primary" type="submit">Submit</Button>
|
|
||||||
</form>
|
</form>
|
||||||
</Card></Col>
|
</Card></Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
Loading…
Reference in New Issue
Block a user