mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 10:35:30 +00:00
+Input styling and some bugfixes
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -113,6 +113,7 @@ type AlmanachResult struct {
|
|||||||
<div class="container-normal mx-auto mt-4 !px-0">
|
<div class="container-normal mx-auto mt-4 !px-0">
|
||||||
{{ template "_usermessage" $model }}
|
{{ template "_usermessage" $model }}
|
||||||
<form
|
<form
|
||||||
|
autocomplete="off"
|
||||||
class="w-full dbform"
|
class="w-full dbform"
|
||||||
id="changealmanachform"
|
id="changealmanachform"
|
||||||
x-target="changealmanachform user-message almanach-header-data"
|
x-target="changealmanachform user-message almanach-header-data"
|
||||||
@@ -127,17 +128,17 @@ type AlmanachResult struct {
|
|||||||
|
|
||||||
<div class="flex gap-8">
|
<div class="flex gap-8">
|
||||||
<!-- Left Column -->
|
<!-- Left Column -->
|
||||||
<div class="flex-1 flex flex-col gap-4">
|
<div class="flex-1 flex flex-col gap-2">
|
||||||
<!-- Kurztitel -->
|
<!-- Kurztitel -->
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="preferred_title" class="inputlabel">Kurztitel</label>
|
<label for="preferred_title" class="inputlabel">Kurztitel</label>
|
||||||
</div>
|
</div>
|
||||||
<textarea name="preferred_title" id="preferred_title" class="inputinput no-enter" placeholder="" required autocomplete="off" rows="1">{{- $model.result.Entry.PreferredTitle -}}</textarea>
|
<textarea name="preferred_title" id="preferred_title" class="inputinput no-enter" placeholder="" required autocomplete="off" rows="1">{{- $model.result.Entry.PreferredTitle -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<div class="flex items-center justify-between gap-4">
|
<div class="flex items-center justify-between gap-2">
|
||||||
<div class="flex items-center gap-2 text-lg font-bold text-gray-700">
|
<div class="flex items-center gap-2 text-lg font-bold text-gray-700">
|
||||||
<i class="ri-book-2-line"></i>
|
<i class="ri-book-2-line"></i>
|
||||||
<span>Titeldaten & Anmerkungen</span>
|
<span>Titeldaten & Anmerkungen</span>
|
||||||
@@ -147,7 +148,7 @@ type AlmanachResult struct {
|
|||||||
Felder hinzufügen</button>
|
Felder hinzufügen</button>
|
||||||
|
|
||||||
<div class="inputwrapper {{ if eq $model.result.Entry.TitleStmt "" }}hidden{{ end }}" data-dm-target="titles">
|
<div class="inputwrapper {{ if eq $model.result.Entry.TitleStmt "" }}hidden{{ end }}" data-dm-target="titles">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="title" class="inputlabel menu-label">Titel</label>
|
<label for="title" class="inputlabel menu-label">Titel</label>
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
<button class="dm-close-button font-bold input-label">
|
<button class="dm-close-button font-bold input-label">
|
||||||
@@ -160,7 +161,7 @@ type AlmanachResult struct {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-2 inputwrapper {{ if eq $model.result.Entry.ParallelTitle "" }}hidden{{ end }}" data-dm-target="titles">
|
<div class="mt-2 inputwrapper {{ if eq $model.result.Entry.ParallelTitle "" }}hidden{{ end }}" data-dm-target="titles">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="paralleltitle" class="inputlabel menu-label">Titel
|
<label for="paralleltitle" class="inputlabel menu-label">Titel
|
||||||
(übersetzt)</label>
|
(übersetzt)</label>
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
@@ -174,7 +175,7 @@ type AlmanachResult struct {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.SubtitleStmt "" }}hidden{{ end }}" data-dm-target="titles">
|
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.SubtitleStmt "" }}hidden{{ end }}" data-dm-target="titles">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="subtitle" class="inputlabel menu-label">Untertitel</label>
|
<label for="subtitle" class="inputlabel menu-label">Untertitel</label>
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
<button class="dm-close-button font-bold input-label">
|
<button class="dm-close-button font-bold input-label">
|
||||||
@@ -187,7 +188,7 @@ type AlmanachResult struct {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.VariantTitle "" }}hidden{{ end }}" data-dm-target="titles">
|
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.VariantTitle "" }}hidden{{ end }}" data-dm-target="titles">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="varianttitle" class="inputlabel menu-label">Titelvarianten</label>
|
<label for="varianttitle" class="inputlabel menu-label">Titelvarianten</label>
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
<button class="dm-close-button font-bold input-label">
|
<button class="dm-close-button font-bold input-label">
|
||||||
@@ -200,7 +201,7 @@ type AlmanachResult struct {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.IncipitStmt "" }}hidden{{ end }}" data-dm-target="titles">
|
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.IncipitStmt "" }}hidden{{ end }}" data-dm-target="titles">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="incipit" class="inputlabel menu-label">Incipit</label>
|
<label for="incipit" class="inputlabel menu-label">Incipit</label>
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
<button class="dm-close-button font-bold input-label">
|
<button class="dm-close-button font-bold input-label">
|
||||||
@@ -213,7 +214,7 @@ type AlmanachResult struct {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inputwrapper {{ if eq $model.result.Entry.ResponsibilityStmt "" }}hidden{{ end }}" data-dm-target="publication">
|
<div class="inputwrapper {{ if eq $model.result.Entry.ResponsibilityStmt "" }}hidden{{ end }}" data-dm-target="publication">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="responsibility_statement" class="inputlabel
|
<label for="responsibility_statement" class="inputlabel
|
||||||
menu-label">Herausgeberangabe</label>
|
menu-label">Herausgeberangabe</label>
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
@@ -227,7 +228,7 @@ type AlmanachResult struct {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.PublicationStmt "" }}hidden{{ end }}" data-dm-target="publication">
|
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.PublicationStmt "" }}hidden{{ end }}" data-dm-target="publication">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="publication_statement" class="inputlabel menu-label">Publikationsangabe</label>
|
<label for="publication_statement" class="inputlabel menu-label">Publikationsangabe</label>
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
<button class="dm-close-button font-bold input-label">
|
<button class="dm-close-button font-bold input-label">
|
||||||
@@ -240,7 +241,7 @@ type AlmanachResult struct {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.PlaceStmt "" }}hidden{{ end }}" data-dm-target="publication">
|
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.PlaceStmt "" }}hidden{{ end }}" data-dm-target="publication">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="place_statement" class="inputlabel menu-label">Ortsangabe</label>
|
<label for="place_statement" class="inputlabel menu-label">Ortsangabe</label>
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
<button class="dm-close-button font-bold input-label">
|
<button class="dm-close-button font-bold input-label">
|
||||||
@@ -259,14 +260,18 @@ type AlmanachResult struct {
|
|||||||
<div id="titles"></div>
|
<div id="titles"></div>
|
||||||
|
|
||||||
<!-- Publication Information: Year and Edition - Always visible -->
|
<!-- Publication Information: Year and Edition - Always visible -->
|
||||||
<div class="flex gap-4">
|
<div class="flex gap-2">
|
||||||
<div class="flex-1 inputwrapper">
|
<div class="flex-1 inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="year" class="inputlabel">Jahr</label>
|
<label for="year" class="inputlabel">Jahr</label>
|
||||||
|
</div>
|
||||||
<input type="number" name="year" id="year" class="inputinput" placeholder="" autocomplete="off" value="{{ if not $model.is_new }}{{ $model.result.Entry.Year }}{{ end }}" />
|
<input type="number" name="year" id="year" class="inputinput" placeholder="" autocomplete="off" value="{{ if not $model.is_new }}{{ $model.result.Entry.Year }}{{ end }}" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-1 inputwrapper">
|
<div class="flex-1 inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="edition" class="inputlabel">Ausgabebezeichnung</label>
|
<label for="edition" class="inputlabel">Ausgabebezeichnung</label>
|
||||||
|
</div>
|
||||||
<textarea name="edition" id="edition" class="inputinput no-enter" placeholder="" autocomplete="off" rows="1">{{- $model.result.Entry.Edition -}}</textarea>
|
<textarea name="edition" id="edition" class="inputinput no-enter" placeholder="" autocomplete="off" rows="1">{{- $model.result.Entry.Edition -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -276,7 +281,9 @@ type AlmanachResult struct {
|
|||||||
|
|
||||||
<!-- Annotationen -->
|
<!-- Annotationen -->
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="annotation" class="inputlabel">Annotationen</label>
|
<label for="annotation" class="inputlabel">Annotationen</label>
|
||||||
|
</div>
|
||||||
<textarea name="annotation" id="annotation" class="inputinput" placeholder="" autocomplete="off" rows="1">{{- $model.result.Entry.Annotation -}}</textarea>
|
<textarea name="annotation" id="annotation" class="inputinput" placeholder="" autocomplete="off" rows="1">{{- $model.result.Entry.Annotation -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -291,7 +298,7 @@ type AlmanachResult struct {
|
|||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<relations-editor data-prefix="entries_series" data-link-base="/reihe/" data-new-label="(Neu)" data-add-toggle-id="series-add-toggle" data-preferred-label="Bevorzugter Reihentitel">
|
<relations-editor data-prefix="entries_series" data-link-base="/reihe/" data-new-label="(Neu)" data-add-toggle-id="series-add-toggle" data-preferred-label="Bevorzugter Reihentitel">
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
<div class="flex items-center justify-between">
|
<div class="inputlabelrow">
|
||||||
<label class="inputlabel" for="series-section">Reihen</label>
|
<label class="inputlabel" for="series-section">Reihen</label>
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<a href="/reihen/new/" class="text-sm font-bold text-gray-700 hover:text-slate-950 no-underline" target="_blank" rel="noreferrer">
|
<a href="/reihen/new/" class="text-sm font-bold text-gray-700 hover:text-slate-950 no-underline" target="_blank" rel="noreferrer">
|
||||||
@@ -430,7 +437,7 @@ type AlmanachResult struct {
|
|||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<relations-editor data-prefix="entries_agents" data-link-base="/person/" data-new-label="(Neu)" data-add-toggle-id="agents-add-toggle">
|
<relations-editor data-prefix="entries_agents" data-link-base="/person/" data-new-label="(Neu)" data-add-toggle-id="agents-add-toggle">
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
<div class="flex items-center justify-between">
|
<div class="inputlabelrow">
|
||||||
<label class="inputlabel" for="agents-section">Personen & Körperschaften</label>
|
<label class="inputlabel" for="agents-section">Personen & Körperschaften</label>
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<a href="/personen/new/" class="text-sm font-bold text-gray-700 hover:text-slate-950 no-underline" target="_blank" rel="noreferrer">
|
<a href="/personen/new/" class="text-sm font-bold text-gray-700 hover:text-slate-950 no-underline" target="_blank" rel="noreferrer">
|
||||||
@@ -569,9 +576,9 @@ type AlmanachResult struct {
|
|||||||
</relations-editor>
|
</relations-editor>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col gap-4 mt-4">
|
<div class="flex flex-col gap-2 mt-4">
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
<div class="flex items-center justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="places" class="inputlabel">Erscheinungs- und Verlagsorte</label>
|
<label for="places" class="inputlabel">Erscheinungs- und Verlagsorte</label>
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<a href="/orte/new/" class="text-sm font-bold text-gray-700 hover:text-slate-950 no-underline" target="_blank" rel="noreferrer">
|
<a href="/orte/new/" class="text-sm font-bold text-gray-700 hover:text-slate-950 no-underline" target="_blank" rel="noreferrer">
|
||||||
@@ -611,7 +618,7 @@ type AlmanachResult struct {
|
|||||||
<div class="flex flex-col gap-4">
|
<div class="flex flex-col gap-4">
|
||||||
<!-- Status -->
|
<!-- Status -->
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="type" class="inputlabel">Status</label>
|
<label for="type" class="inputlabel">Status</label>
|
||||||
</div>
|
</div>
|
||||||
<select name="type" id="type" autocomplete="off" class="inputselect font-bold">
|
<select name="type" id="type" autocomplete="off" class="inputselect font-bold">
|
||||||
@@ -630,7 +637,7 @@ type AlmanachResult struct {
|
|||||||
Bearbeitungsvermerk hinzufügen</button>
|
Bearbeitungsvermerk hinzufügen</button>
|
||||||
|
|
||||||
<div class="inputwrapper {{ if eq $model.result.Entry.Comment "" }}hidden{{ end }}">
|
<div class="inputwrapper {{ if eq $model.result.Entry.Comment "" }}hidden{{ end }}">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="edit_comment" class="inputlabel menu-label">Bearbeitungsvermerk</label>
|
<label for="edit_comment" class="inputlabel menu-label">Bearbeitungsvermerk</label>
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
<button class="dm-close-button font-bold input-label">
|
<button class="dm-close-button font-bold input-label">
|
||||||
@@ -656,7 +663,7 @@ type AlmanachResult struct {
|
|||||||
Physische Beschreibung hinzufügen</button>
|
Physische Beschreibung hinzufügen</button>
|
||||||
|
|
||||||
<div class="inputwrapper {{ if eq $model.result.Entry.Extent "" }}hidden{{ end }}">
|
<div class="inputwrapper {{ if eq $model.result.Entry.Extent "" }}hidden{{ end }}">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="extent" class="inputlabel menu-label">Struktur/Umfang</label>
|
<label for="extent" class="inputlabel menu-label">Struktur/Umfang</label>
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
<button class="dm-close-button font-bold input-label">
|
<button class="dm-close-button font-bold input-label">
|
||||||
@@ -669,7 +676,7 @@ type AlmanachResult struct {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.Dimensions "" }}hidden{{ end }}">
|
<div class="mt-3 inputwrapper {{ if eq $model.result.Entry.Dimensions "" }}hidden{{ end }}">
|
||||||
<div class="flex flex-row justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="dimensions" class="inputlabel menu-label">Maße</label>
|
<label for="dimensions" class="inputlabel menu-label">Maße</label>
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
<button class="dm-close-button font-bold input-label">
|
<button class="dm-close-button font-bold input-label">
|
||||||
@@ -686,7 +693,7 @@ type AlmanachResult struct {
|
|||||||
<div class="flex flex-col gap-4 mt-4">
|
<div class="flex flex-col gap-4 mt-4">
|
||||||
<!-- Languages -->
|
<!-- Languages -->
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
<div class="flex items-center justify-between">
|
<div class="inputlabelrow">
|
||||||
<label for="languages" class="inputlabel">Sprachen</label>
|
<label for="languages" class="inputlabel">Sprachen</label>
|
||||||
<button type="button" id="languages-add-toggle" class="text-sm font-bold text-gray-700 hover:text-slate-950 no-underline pr-3">
|
<button type="button" id="languages-add-toggle" class="text-sm font-bold text-gray-700 hover:text-slate-950 no-underline pr-3">
|
||||||
<i class="ri-link"></i> Sprache verlinken
|
<i class="ri-link"></i> Sprache verlinken
|
||||||
@@ -705,7 +712,9 @@ type AlmanachResult struct {
|
|||||||
|
|
||||||
<!-- Nachweise - Always visible -->
|
<!-- Nachweise - Always visible -->
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="refs" class="inputlabel">Nachweise</label>
|
<label for="refs" class="inputlabel">Nachweise</label>
|
||||||
|
</div>
|
||||||
<textarea name="refs" id="refs" class="inputinput no-enter" placeholder="" autocomplete="off" rows="1">{{- $model.result.Entry.References -}}</textarea>
|
<textarea name="refs" id="refs" class="inputinput no-enter" placeholder="" autocomplete="off" rows="1">{{- $model.result.Entry.References -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -109,19 +109,27 @@
|
|||||||
<div class="flex gap-8">
|
<div class="flex gap-8">
|
||||||
<div class="flex-1 flex flex-col gap-4">
|
<div class="flex-1 flex flex-col gap-4">
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="name" class="inputlabel">Name</label>
|
<label for="name" class="inputlabel">Name</label>
|
||||||
|
</div>
|
||||||
<textarea name="name" id="name" class="inputinput no-enter" autocomplete="off" rows="1">{{- $place.Name -}}</textarea>
|
<textarea name="name" id="name" class="inputinput no-enter" autocomplete="off" rows="1">{{- $place.Name -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="pseudonyms" class="inputlabel">Alternativnamen</label>
|
<label for="pseudonyms" class="inputlabel">Alternativnamen</label>
|
||||||
|
</div>
|
||||||
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $place.Pseudonyms -}}</textarea>
|
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $place.Pseudonyms -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="annotation" class="inputlabel">Annotation</label>
|
<label for="annotation" class="inputlabel">Annotation</label>
|
||||||
|
</div>
|
||||||
<textarea name="annotation" id="annotation" class="inputinput" autocomplete="off" rows="2">{{- $place.Annotation -}}</textarea>
|
<textarea name="annotation" id="annotation" class="inputinput" autocomplete="off" rows="2">{{- $place.Annotation -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="uri" class="inputlabel">URI</label>
|
<label for="uri" class="inputlabel">URI</label>
|
||||||
|
</div>
|
||||||
<input name="uri" id="uri" class="inputinput" autocomplete="off" value="{{ $place.URI }}" />
|
<input name="uri" id="uri" class="inputinput" autocomplete="off" value="{{ $place.URI }}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
@@ -135,7 +143,9 @@
|
|||||||
|
|
||||||
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="status" class="inputlabel">Status</label>
|
<label for="status" class="inputlabel">Status</label>
|
||||||
|
</div>
|
||||||
<select name="status" id="status" autocomplete="off" class="inputselect font-bold">
|
<select name="status" id="status" autocomplete="off" class="inputselect font-bold">
|
||||||
<option value="Unknown" {{ if eq $place.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
<option value="Unknown" {{ if eq $place.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
||||||
<option value="ToDo" {{ if eq $place.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
<option value="ToDo" {{ if eq $place.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
||||||
@@ -145,7 +155,9 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="edit_comment" class="inputlabel">Bearbeitungsvermerk</label>
|
<label for="edit_comment" class="inputlabel">Bearbeitungsvermerk</label>
|
||||||
|
</div>
|
||||||
<textarea name="edit_comment" id="edit_comment" class="inputinput" autocomplete="off" rows="1">{{- $place.Comment -}}</textarea>
|
<textarea name="edit_comment" id="edit_comment" class="inputinput" autocomplete="off" rows="1">{{- $place.Comment -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
|
|||||||
@@ -108,11 +108,15 @@
|
|||||||
<div class="flex gap-8">
|
<div class="flex gap-8">
|
||||||
<div class="flex-1 flex flex-col gap-4">
|
<div class="flex-1 flex flex-col gap-4">
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="name" class="inputlabel">Name</label>
|
<label for="name" class="inputlabel">Name</label>
|
||||||
|
</div>
|
||||||
<textarea name="name" id="name" class="inputinput no-enter" autocomplete="off" rows="1">{{- $agent.Name -}}</textarea>
|
<textarea name="name" id="name" class="inputinput no-enter" autocomplete="off" rows="1">{{- $agent.Name -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="pseudonyms" class="inputlabel">Pseudonyme</label>
|
<label for="pseudonyms" class="inputlabel">Pseudonyme</label>
|
||||||
|
</div>
|
||||||
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $agent.Pseudonyms -}}</textarea>
|
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $agent.Pseudonyms -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
@@ -124,23 +128,33 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="biographical_data" class="inputlabel">Biografische Angaben</label>
|
<label for="biographical_data" class="inputlabel">Biografische Angaben</label>
|
||||||
|
</div>
|
||||||
<textarea name="biographical_data" id="biographical_data" class="inputinput" autocomplete="off" rows="2">{{- $agent.BiographicalData -}}</textarea>
|
<textarea name="biographical_data" id="biographical_data" class="inputinput" autocomplete="off" rows="2">{{- $agent.BiographicalData -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="profession" class="inputlabel">Profession</label>
|
<label for="profession" class="inputlabel">Profession</label>
|
||||||
|
</div>
|
||||||
<input name="profession" id="profession" class="inputinput" autocomplete="off" value="{{ $agent.Profession }}" />
|
<input name="profession" id="profession" class="inputinput" autocomplete="off" value="{{ $agent.Profession }}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="uri" class="inputlabel">URI</label>
|
<label for="uri" class="inputlabel">URI</label>
|
||||||
|
</div>
|
||||||
<input name="uri" id="uri" class="inputinput" autocomplete="off" value="{{ $agent.URI }}" />
|
<input name="uri" id="uri" class="inputinput" autocomplete="off" value="{{ $agent.URI }}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="references" class="inputlabel">Nachweise</label>
|
<label for="references" class="inputlabel">Nachweise</label>
|
||||||
|
</div>
|
||||||
<textarea name="references" id="references" class="inputinput no-enter" autocomplete="off" rows="1">{{- $agent.References -}}</textarea>
|
<textarea name="references" id="references" class="inputinput no-enter" autocomplete="off" rows="1">{{- $agent.References -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="annotation" class="inputlabel">Annotation</label>
|
<label for="annotation" class="inputlabel">Annotation</label>
|
||||||
|
</div>
|
||||||
<textarea name="annotation" id="annotation" class="inputinput" autocomplete="off" rows="2">{{- $agent.Annotation -}}</textarea>
|
<textarea name="annotation" id="annotation" class="inputinput" autocomplete="off" rows="2">{{- $agent.Annotation -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
@@ -154,7 +168,9 @@
|
|||||||
|
|
||||||
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="status" class="inputlabel">Status</label>
|
<label for="status" class="inputlabel">Status</label>
|
||||||
|
</div>
|
||||||
<select name="status" id="status" autocomplete="off" class="inputselect font-bold">
|
<select name="status" id="status" autocomplete="off" class="inputselect font-bold">
|
||||||
<option value="Unknown" {{ if eq $agent.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
<option value="Unknown" {{ if eq $agent.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
||||||
<option value="ToDo" {{ if eq $agent.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
<option value="ToDo" {{ if eq $agent.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
||||||
@@ -164,7 +180,9 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="edit_comment" class="inputlabel">Bearbeitungsvermerk</label>
|
<label for="edit_comment" class="inputlabel">Bearbeitungsvermerk</label>
|
||||||
|
</div>
|
||||||
<textarea name="edit_comment" id="edit_comment" class="inputinput" autocomplete="off" rows="1">{{- $agent.Comment -}}</textarea>
|
<textarea name="edit_comment" id="edit_comment" class="inputinput" autocomplete="off" rows="1">{{- $agent.Comment -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
|
|||||||
@@ -111,30 +111,42 @@
|
|||||||
<div class="flex gap-8">
|
<div class="flex gap-8">
|
||||||
<div class="flex-1 flex flex-col gap-4">
|
<div class="flex-1 flex flex-col gap-4">
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="title" class="inputlabel">Reihentitel</label>
|
<label for="title" class="inputlabel">Reihentitel</label>
|
||||||
|
</div>
|
||||||
<textarea name="title" id="title" class="inputinput no-enter" autocomplete="off" rows="1">{{- $series.Title -}}</textarea>
|
<textarea name="title" id="title" class="inputinput no-enter" autocomplete="off" rows="1">{{- $series.Title -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="pseudonyms" class="inputlabel">Alternativtitel</label>
|
<label for="pseudonyms" class="inputlabel">Alternativtitel</label>
|
||||||
|
</div>
|
||||||
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $series.Pseudonyms -}}</textarea>
|
<textarea name="pseudonyms" id="pseudonyms" class="inputinput" autocomplete="off" rows="1">{{- $series.Pseudonyms -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="annotation" class="inputlabel">Annotation</label>
|
<label for="annotation" class="inputlabel">Annotation</label>
|
||||||
|
</div>
|
||||||
<textarea name="annotation" id="annotation" class="inputinput" autocomplete="off" rows="2">{{- $series.Annotation -}}</textarea>
|
<textarea name="annotation" id="annotation" class="inputinput" autocomplete="off" rows="2">{{- $series.Annotation -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="references" class="inputlabel">Nachweise</label>
|
<label for="references" class="inputlabel">Nachweise</label>
|
||||||
|
</div>
|
||||||
<textarea name="references" id="references" class="inputinput no-enter" autocomplete="off" rows="1">{{- $series.References -}}</textarea>
|
<textarea name="references" id="references" class="inputinput no-enter" autocomplete="off" rows="1">{{- $series.References -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="frequency" class="inputlabel">Erscheinungsfrequenz</label>
|
<label for="frequency" class="inputlabel">Erscheinungsfrequenz</label>
|
||||||
|
</div>
|
||||||
<input name="frequency" id="frequency" class="inputinput" autocomplete="off" value="{{ $series.Frequency }}" />
|
<input name="frequency" id="frequency" class="inputinput" autocomplete="off" value="{{ $series.Frequency }}" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
<div class="w-[28rem] shrink-0 flex flex-col gap-3">
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="status" class="inputlabel">Status</label>
|
<label for="status" class="inputlabel">Status</label>
|
||||||
|
</div>
|
||||||
<select name="status" id="status" autocomplete="off" class="inputselect font-bold">
|
<select name="status" id="status" autocomplete="off" class="inputselect font-bold">
|
||||||
<option value="Unknown" {{ if eq $series.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
<option value="Unknown" {{ if eq $series.EditState "Unknown" }}selected{{ end }}>Unbekannt</option>
|
||||||
<option value="ToDo" {{ if eq $series.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
<option value="ToDo" {{ if eq $series.EditState "ToDo" }}selected{{ end }}>Zu erledigen</option>
|
||||||
@@ -144,7 +156,9 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputwrapper">
|
<div class="inputwrapper">
|
||||||
|
<div class="inputlabelrow">
|
||||||
<label for="edit_comment" class="inputlabel">Bearbeitungsvermerk</label>
|
<label for="edit_comment" class="inputlabel">Bearbeitungsvermerk</label>
|
||||||
|
</div>
|
||||||
<textarea name="edit_comment" id="edit_comment" class="inputinput" autocomplete="off" rows="1">{{- $series.Comment -}}</textarea>
|
<textarea name="edit_comment" id="edit_comment" class="inputinput" autocomplete="off" rows="1">{{- $series.Comment -}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
@@ -273,7 +287,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-end gap-3 mt-4">
|
<div class="flex items-center justify-end gap-3 mt-4">
|
||||||
<button type="button" class="resetbutton w-auto px-3 py-1 text-sm" data-role="edit-delete-cancel">Abbrechen</button>
|
<button type="button" class="resetbutton w-auto px-3 py-1 text-sm" data-role="edit-delete-cancel">Abbrechen</button>
|
||||||
<button type="button" class="submitbutton w-auto bg-red-700 hover:bg-red-800 px-3 py-1 text-sm" data-role="edit-delete-confirm">
|
<button type="button" class="submitbutton w-auto bg-red-700 hover:bg-red-800 px-3
|
||||||
|
py-1 text-sm text-white" data-role="edit-delete-confirm">
|
||||||
Löschen
|
Löschen
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="flex flex-row max-w-[60rem]">
|
<div class="flex flex-row max-w-[60rem]">
|
||||||
<div class="w-32 grow-0 shrink-0 border-r border-zinc-300 pr-3 pt-4">
|
<div class="w-40 grow-0 shrink-0 border-r border-zinc-300 pr-3 pt-4">
|
||||||
<div class="flex flex-col items-end pt-1">
|
<div class="flex flex-col items-end pt-1">
|
||||||
<div class="flex flex-row gap-x-1">
|
<div class="flex flex-row gap-x-1">
|
||||||
<div class="inline-block ml-1 whitespace-nowrap">
|
<div class="inline-block ml-1 whitespace-nowrap">
|
||||||
@@ -97,6 +97,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{- if (IsAdminOrEditor $model.request.user) -}}
|
||||||
|
<a href="/almanach/{{ $entry.MusenalmID }}/edit" class="no-underline rounded
|
||||||
|
bg-stone-100 px-1.5 text-sm mt-1.5">
|
||||||
|
<i class="ri-edit-line"></i>
|
||||||
|
Bearbeiten
|
||||||
|
</a>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="font-serif ml-3 pt-4">
|
<div class="font-serif ml-3 pt-4">
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ export class FabMenu extends HTMLElement {
|
|||||||
this.state = null; // Will be set in connectedCallback: 'closed', 'half', 'full'
|
this.state = null; // Will be set in connectedCallback: 'closed', 'half', 'full'
|
||||||
this.handleClick = this.handleClick.bind(this);
|
this.handleClick = this.handleClick.bind(this);
|
||||||
this.handleClickAway = this.handleClickAway.bind(this);
|
this.handleClickAway = this.handleClickAway.bind(this);
|
||||||
this.handleDeleteClick = this.handleDeleteClick.bind(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
@@ -71,14 +70,6 @@ export class FabMenu extends HTMLElement {
|
|||||||
// Build half-open menu content
|
// Build half-open menu content
|
||||||
let halfOpenContent = "";
|
let halfOpenContent = "";
|
||||||
if (hasReihe) {
|
if (hasReihe) {
|
||||||
const deleteButton = hasCsrf
|
|
||||||
? `
|
|
||||||
<button data-action="delete-reihe" data-id="${reiheId}" class="w-full flex items-center px-4 py-2 hover:bg-gray-100 transition-colors text-sm text-left">
|
|
||||||
<i class="ri-delete-bin-line text-base text-red-600 mr-2.5"></i>
|
|
||||||
<span class="text-red-600">Löschen</span>
|
|
||||||
</button>
|
|
||||||
`
|
|
||||||
: "";
|
|
||||||
halfOpenContent = `
|
halfOpenContent = `
|
||||||
<div class="px-3 py-1.5 text-xs font-semibold text-gray-500 uppercase tracking-wider">
|
<div class="px-3 py-1.5 text-xs font-semibold text-gray-500 uppercase tracking-wider">
|
||||||
Reihe
|
Reihe
|
||||||
@@ -87,7 +78,6 @@ export class FabMenu extends HTMLElement {
|
|||||||
<i class="ri-edit-line text-base text-gray-700 mr-2.5"></i>
|
<i class="ri-edit-line text-base text-gray-700 mr-2.5"></i>
|
||||||
<span class="text-gray-900">Bearbeiten</span>
|
<span class="text-gray-900">Bearbeiten</span>
|
||||||
</a>
|
</a>
|
||||||
${deleteButton}
|
|
||||||
`;
|
`;
|
||||||
} else if (hasPerson) {
|
} else if (hasPerson) {
|
||||||
halfOpenContent = `
|
halfOpenContent = `
|
||||||
@@ -100,14 +90,6 @@ export class FabMenu extends HTMLElement {
|
|||||||
</a>
|
</a>
|
||||||
`;
|
`;
|
||||||
} else if (hasEntry) {
|
} else if (hasEntry) {
|
||||||
const deleteButton = hasCsrf
|
|
||||||
? `
|
|
||||||
<button data-action="delete-almanach" data-id="${entryId}" class="w-full flex items-center px-4 py-2 hover:bg-gray-100 transition-colors text-sm text-left">
|
|
||||||
<i class="ri-delete-bin-line text-base text-red-600 mr-2.5"></i>
|
|
||||||
<span class="text-red-600">Löschen</span>
|
|
||||||
</button>
|
|
||||||
`
|
|
||||||
: "";
|
|
||||||
halfOpenContent = `
|
halfOpenContent = `
|
||||||
<div class="px-3 py-1.5 text-xs font-semibold text-gray-500 uppercase tracking-wider">
|
<div class="px-3 py-1.5 text-xs font-semibold text-gray-500 uppercase tracking-wider">
|
||||||
Almanach
|
Almanach
|
||||||
@@ -116,7 +98,6 @@ export class FabMenu extends HTMLElement {
|
|||||||
<i class="ri-edit-line text-base text-gray-700 mr-2.5"></i>
|
<i class="ri-edit-line text-base text-gray-700 mr-2.5"></i>
|
||||||
<span class="text-gray-900">Bearbeiten</span>
|
<span class="text-gray-900">Bearbeiten</span>
|
||||||
</a>
|
</a>
|
||||||
${deleteButton}
|
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,53 +210,6 @@ export class FabMenu extends HTMLElement {
|
|||||||
`
|
`
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
// Build delete dialogs (only if CSRF token is available)
|
|
||||||
let deleteDialogs = "";
|
|
||||||
if (hasReihe && hasCsrf) {
|
|
||||||
deleteDialogs += `
|
|
||||||
<div class="fab-delete-dialog hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50" data-dialog="reihe">
|
|
||||||
<div class="bg-white rounded-lg p-6 max-w-md mx-4">
|
|
||||||
<h3 class="text-lg font-semibold mb-4">Reihe löschen?</h3>
|
|
||||||
<p class="text-gray-700 mb-6">Möchten Sie diese Reihe wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.</p>
|
|
||||||
<div class="flex gap-3 justify-end">
|
|
||||||
<button data-action="cancel-delete" class="px-4 py-2 bg-gray-200 hover:bg-gray-300 rounded transition-colors">
|
|
||||||
Abbrechen
|
|
||||||
</button>
|
|
||||||
<form method="POST" action="/reihe/${reiheId}/edit/delete">
|
|
||||||
<input type="hidden" name="csrf_token" value="${csrfToken}">
|
|
||||||
<input type="hidden" name="last_edited" value="${reiheUpdated}">
|
|
||||||
<button type="submit" class="px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded transition-colors">
|
|
||||||
Löschen
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
if (hasEntry && hasCsrf) {
|
|
||||||
deleteDialogs += `
|
|
||||||
<div class="fab-delete-dialog hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50" data-dialog="almanach">
|
|
||||||
<div class="bg-white rounded-lg p-6 max-w-md mx-4">
|
|
||||||
<h3 class="text-lg font-semibold mb-4">Almanach-Eintrag löschen?</h3>
|
|
||||||
<p class="text-gray-700 mb-6">Möchten Sie diesen Eintrag wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.</p>
|
|
||||||
<div class="flex gap-3 justify-end">
|
|
||||||
<button data-action="cancel-delete" class="px-4 py-2 bg-gray-200 hover:bg-gray-300 rounded transition-colors">
|
|
||||||
Abbrechen
|
|
||||||
</button>
|
|
||||||
<form method="POST" action="/almanach/${entryId}/edit/delete">
|
|
||||||
<input type="hidden" name="csrf_token" value="${csrfToken}">
|
|
||||||
<input type="hidden" name="last_edited" value="${entryUpdated}">
|
|
||||||
<button type="submit" class="px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded transition-colors">
|
|
||||||
Löschen
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build the unified menu content
|
// Build the unified menu content
|
||||||
const contextualSection = halfOpenContent ? halfOpenContent : "";
|
const contextualSection = halfOpenContent ? halfOpenContent : "";
|
||||||
const contextualDivider = halfOpenContent ? '<div class="border-t border-gray-200"></div>' : "";
|
const contextualDivider = halfOpenContent ? '<div class="border-t border-gray-200"></div>' : "";
|
||||||
@@ -284,7 +218,7 @@ export class FabMenu extends HTMLElement {
|
|||||||
this.innerHTML = `
|
this.innerHTML = `
|
||||||
<div class="fixed bottom-12 left-8 z-50">
|
<div class="fixed bottom-12 left-8 z-50">
|
||||||
<!-- Unified Menu Container -->
|
<!-- Unified Menu Container -->
|
||||||
<div class="fab-menu hidden absolute bottom-16 left-0 w-64 bg-white rounded border border-gray-300 shadow transition-all duration-200 ease-out">
|
<div class="fab-menu hidden absolute bottom-16 left-0 w-64 bg-white rounded border border-gray-300 shadow transition-all duration-100 ease-out">
|
||||||
<!-- Contextual actions (always at top when present) -->
|
<!-- Contextual actions (always at top when present) -->
|
||||||
${contextualSection}
|
${contextualSection}
|
||||||
${contextualDivider}
|
${contextualDivider}
|
||||||
@@ -314,7 +248,6 @@ export class FabMenu extends HTMLElement {
|
|||||||
<i class="fab-icon text-2xl transition-all duration-200 ri-menu-line"></i>
|
<i class="fab-icon text-2xl transition-all duration-200 ri-menu-line"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
${deleteDialogs}
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -331,20 +264,6 @@ export class FabMenu extends HTMLElement {
|
|||||||
// Add event listeners
|
// Add event listeners
|
||||||
this._button.addEventListener("click", this.handleClick);
|
this._button.addEventListener("click", this.handleClick);
|
||||||
document.addEventListener("click", this.handleClickAway);
|
document.addEventListener("click", this.handleClickAway);
|
||||||
|
|
||||||
// Delete button handlers
|
|
||||||
const deleteButtons = this.querySelectorAll('[data-action^="delete-"]');
|
|
||||||
deleteButtons.forEach((btn) => {
|
|
||||||
btn.addEventListener("click", this.handleDeleteClick);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Cancel delete handlers
|
|
||||||
const cancelButtons = this.querySelectorAll('[data-action="cancel-delete"]');
|
|
||||||
cancelButtons.forEach((btn) => {
|
|
||||||
btn.addEventListener("click", () => {
|
|
||||||
this.closeAllDialogs();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnectedCallback() {
|
disconnectedCallback() {
|
||||||
@@ -363,20 +282,6 @@ export class FabMenu extends HTMLElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleDeleteClick(e) {
|
|
||||||
const action = e.currentTarget.getAttribute("data-action");
|
|
||||||
const entityType = action.replace("delete-", "");
|
|
||||||
const dialog = this.querySelector(`[data-dialog="${entityType}"]`);
|
|
||||||
if (dialog) {
|
|
||||||
dialog.classList.remove("hidden");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
closeAllDialogs() {
|
|
||||||
const dialogs = this.querySelectorAll(".fab-delete-dialog");
|
|
||||||
dialogs.forEach((dialog) => dialog.classList.add("hidden"));
|
|
||||||
}
|
|
||||||
|
|
||||||
nextState() {
|
nextState() {
|
||||||
if (this.state === "closed") {
|
if (this.state === "closed") {
|
||||||
this.setState(this.hasContext ? "half" : "full");
|
this.setState(this.hasContext ? "half" : "full");
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dbform .inputwrapper {
|
.dbform .inputwrapper {
|
||||||
@apply rounded-xs border-2 border-transparent py-1
|
@apply rounded-xs border-2 border-transparent
|
||||||
border-l-2 focus-within:border-l-slate-600
|
border-l-2 focus-within:border-l-slate-600
|
||||||
bg-stone-100 focus-within:bg-slate-100 transition-all duration-100;
|
bg-stone-100 focus-within:bg-slate-100 transition-all duration-100;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dbform .inputwrapper .inputlabel {
|
.dbform .inputwrapper .inputlabel {
|
||||||
@apply px-3 text-gray-700 font-bold py-1;
|
@apply px-3 text-gray-800 font-bold py-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dbform .inputwrapper .inputinput {
|
.dbform .inputwrapper .inputinput {
|
||||||
@@ -33,7 +33,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.inputlabeltext {
|
.inputlabeltext {
|
||||||
@apply text-gray-700 font-bold;
|
@apply font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inputlabelrow {
|
||||||
|
@apply bg-stone-200 border-b flex flex-row justify-between mb-1 align-middle items-center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dbform .inputwrapper .inputselect {
|
.dbform .inputwrapper .inputselect {
|
||||||
|
|||||||
Reference in New Issue
Block a user