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>
|
<script>
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { useTinyRouter } from 'svelte-tiny-router';
|
import { useTinyRouter } from 'svelte-tiny-router';
|
||||||
|
import { t } from '../../translations.svelte';
|
||||||
|
|
||||||
import LineEditor from '../../Components/LineEditor.svelte';
|
import LineEditor from '../../Components/LineEditor.svelte';
|
||||||
import MarkdownEditor from '../../Components/MarkdownEditor.svelte';
|
import MarkdownEditor from '../../Components/MarkdownEditor.svelte';
|
||||||
@@ -23,13 +24,17 @@
|
|||||||
function movedown(){
|
function movedown(){
|
||||||
movePos(pos.number,1);
|
movePos(pos.number,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function toggleOptional(ev){
|
||||||
|
const ok = await submit(`${prefix}.optional`,!pos.optional);
|
||||||
|
if (ok) pos.optional = !pos.optional;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.move{
|
.move{
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr > *:nth-child(1){
|
tr > *:nth-child(1){
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
@@ -66,6 +71,7 @@
|
|||||||
<span onclick={moveup}>⏫</span>
|
<span onclick={moveup}>⏫</span>
|
||||||
{/if}
|
{/if}
|
||||||
<span onclick={() => drop(pos.number)}>❌</span>
|
<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>
|
<span onclick={movedown}>⏬</span>
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -167,6 +167,7 @@
|
|||||||
"filter": "Filter",
|
"filter": "Filter",
|
||||||
"filter by tags": "Nach Tags filtern",
|
"filter by tags": "Nach Tags filtern",
|
||||||
"first_transaction": "erste Transaktion",
|
"first_transaction": "erste Transaktion",
|
||||||
|
"fixed position": "fester Posten",
|
||||||
"footer": "Fuß-Text",
|
"footer": "Fuß-Text",
|
||||||
"foreign_id": "externe Kennung",
|
"foreign_id": "externe Kennung",
|
||||||
"forgot_pass" : "Password vergessen?",
|
"forgot_pass" : "Password vergessen?",
|
||||||
@@ -280,6 +281,7 @@
|
|||||||
"old_password": "altes Passwort",
|
"old_password": "altes Passwort",
|
||||||
"offer": "Angebot",
|
"offer": "Angebot",
|
||||||
"option": "Option",
|
"option": "Option",
|
||||||
|
"optional position": "optionaler Posten",
|
||||||
"options": "Optionen",
|
"options": "Optionen",
|
||||||
"organization": "Organisation",
|
"organization": "Organisation",
|
||||||
"other party": "Gegenseite",
|
"other party": "Gegenseite",
|
||||||
|
|||||||
@@ -167,6 +167,7 @@
|
|||||||
"filter": "filter",
|
"filter": "filter",
|
||||||
"filter by tags": "filter by tags",
|
"filter by tags": "filter by tags",
|
||||||
"first_transaction": "first transaction",
|
"first_transaction": "first transaction",
|
||||||
|
"fixed position": "fixed position",
|
||||||
"footer": "footer",
|
"footer": "footer",
|
||||||
"foreign_id": "external ID",
|
"foreign_id": "external ID",
|
||||||
"forgot_pass" : "forgot password?",
|
"forgot_pass" : "forgot password?",
|
||||||
@@ -280,6 +281,7 @@
|
|||||||
"old_password": "old password",
|
"old_password": "old password",
|
||||||
"offer": "offer",
|
"offer": "offer",
|
||||||
"option": "option",
|
"option": "option",
|
||||||
|
"optional position": "optional position",
|
||||||
"options": "options",
|
"options": "options",
|
||||||
"organization": "organization",
|
"organization": "organization",
|
||||||
"other party": "other party",
|
"other party": "other party",
|
||||||
|
|||||||
@@ -341,6 +341,14 @@ tr:hover .taglist .tag button {
|
|||||||
color: yellow;
|
color: yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom-color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top-color: red;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 900px) {
|
@media screen and (max-width: 900px) {
|
||||||
#app nav a{
|
#app nav a{
|
||||||
background: black;
|
background: black;
|
||||||
|
|||||||
@@ -390,6 +390,7 @@ span.timetracking {
|
|||||||
|
|
||||||
table{
|
table{
|
||||||
min-width: 30vw;
|
min-width: 30vw;
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
.start_end{
|
.start_end{
|
||||||
@@ -485,6 +486,14 @@ select.autocomplete{
|
|||||||
width: calc(100% - 50px);
|
width: calc(100% - 50px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top: 3px solid;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 900px) {
|
@media screen and (min-width: 900px) {
|
||||||
#app nav > button.symbol{
|
#app nav > button.symbol{
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -337,6 +337,14 @@ code,
|
|||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom-color: gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top-color: gold;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 900px) {
|
@media screen and (max-width: 900px) {
|
||||||
#app nav a{
|
#app nav a{
|
||||||
background: black;
|
background: black;
|
||||||
|
|||||||
@@ -484,6 +484,7 @@ span.timetracking {
|
|||||||
|
|
||||||
table{
|
table{
|
||||||
min-width: 30vw;
|
min-width: 30vw;
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
.start_end{
|
.start_end{
|
||||||
@@ -589,6 +590,14 @@ select.autocomplete{
|
|||||||
width: calc(100% - 50px);
|
width: calc(100% - 50px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top: 3px solid;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 900px) {
|
@media screen and (min-width: 900px) {
|
||||||
#app nav > button.symbol{
|
#app nav > button.symbol{
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -288,6 +288,15 @@ tr:hover .taglist .tag button {
|
|||||||
background: cyan;
|
background: cyan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom-color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top-color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: 900px) {
|
@media screen and (max-width: 900px) {
|
||||||
#app nav a{
|
#app nav a{
|
||||||
background: white;
|
background: white;
|
||||||
|
|||||||
@@ -483,6 +483,7 @@ span.timetracking {
|
|||||||
|
|
||||||
table{
|
table{
|
||||||
min-width: 30vw;
|
min-width: 30vw;
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
.start_end{
|
.start_end{
|
||||||
@@ -578,6 +579,14 @@ select.autocomplete{
|
|||||||
width: calc(100% - 50px);
|
width: calc(100% - 50px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.positions tr:nth-child(2n){
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.positions tbody tr:last-child{
|
||||||
|
border-top: 3px solid;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 900px) {
|
@media screen and (min-width: 900px) {
|
||||||
#app nav > button.symbol{
|
#app nav > button.symbol{
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
Reference in New Issue
Block a user