implemented button to make document positions optional
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import { useTinyRouter } from 'svelte-tiny-router';
|
||||
import { t } from '../../translations.svelte';
|
||||
|
||||
import LineEditor from '../../Components/LineEditor.svelte';
|
||||
import MarkdownEditor from '../../Components/MarkdownEditor.svelte';
|
||||
@@ -23,13 +24,17 @@
|
||||
function movedown(){
|
||||
movePos(pos.number,1);
|
||||
}
|
||||
|
||||
async function toggleOptional(ev){
|
||||
const ok = await submit(`${prefix}.optional`,!pos.optional);
|
||||
if (ok) pos.optional = !pos.optional;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.move{
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
tr > *:nth-child(1){
|
||||
text-align: right;
|
||||
}
|
||||
@@ -66,6 +71,7 @@
|
||||
<span onclick={moveup}>⏫</span>
|
||||
{/if}
|
||||
<span onclick={() => drop(pos.number)}>❌</span>
|
||||
<span class="symbol" onclick={toggleOptional} title={t(pos.optional?'optional position':'fixed position')}>{pos.optional?'':''}</span>
|
||||
<span onclick={movedown}>⏬</span>
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user