BUGFIX: fehlende edits

This commit is contained in:
Simon Martens
2024-04-26 18:21:32 +02:00
parent 7f0ca822c3
commit aaf76244da
7 changed files with 496 additions and 518 deletions

View File

@@ -11,12 +11,15 @@ namespace HaDocument.Reactors {
private Dictionary<string, string[]> _intermediateReasons = new Dictionary<string, string[]>();
private bool _normalizeWhitespace = false;
// State
// State for <etitreason>
private string Index = "";
// State for <letterText>
private string letter = "";
private string page = "";
private string line = "";
private Stack<string> index;
private ElementStringBinder _element = null;

View File

@@ -40,7 +40,7 @@ public class Briefecontroller : Controller {
var text = lib.Letters.ContainsKey(id) ? lib.Letters[id] : null;
var marginals = lib.Marginals.ContainsKey(id) ? lib.Marginals[id] : null;
var tradition = lib.Traditions.ContainsKey(id) ? lib.Traditions[id] : null;
var editreasons = lib.Editreasons.ContainsKey(id) ? lib.EditreasonsByLetter[id] : null; // TODO: Order
var editreasons = lib.EditreasonsByLetter.Contains(id) ? lib.EditreasonsByLetter[id] : null;
var hands = lib.Hands.ContainsKey(id) ? lib.Hands[id] : null;
var nextmeta = meta != lib.MetasByDate.Last() ? lib.MetasByDate.ItemRef(lib.MetasByDate.IndexOf(meta) + 1) : null;
var prevmeta = meta != lib.MetasByDate.First() ? lib.MetasByDate.ItemRef(lib.MetasByDate.IndexOf(meta) - 1) : null;
@@ -80,10 +80,12 @@ public class Briefecontroller : Controller {
texts.Add((category, new List<Text>() { t }));
else
texts.Where(x => x.Category == category).First().Item2.Add(t);
} else {
}
else {
model.MetaData.HasText = false;
}
} else {
}
else {
model.MetaData.HasText = false;
}
@@ -159,7 +161,8 @@ public class Briefecontroller : Controller {
HTMLHelpers.StringHelpers.GetEnumerationString(receivers.Select(x => x.Name))
));
}
} else {
}
else {
if (senders.Any(x => receivers.Contains(x))) {
for (var i = 0; i < receivers.Count || i < senders.Count; i++) {
res.Add((

View File

@@ -1,7 +1,8 @@
@model XMLStateViewModel;
@{
ViewData["Title"] = "Syntax-Check & Dateien";
ViewData["SEODescription"] = "Johann Georg Hamann: Kommentierte Briefausgabe, Hg. v. Leonard Keidel und Janina Reibold. Durchsuchbare Online-Ausgabe der Briefe von und an Johann Georg Hamann.";
ViewData["SEODescription"] = @"Johann Georg Hamann: Kommentierte Briefausgabe, Hg. v. Leonard Keidel und Janina Reibold.
Durchsuchbare Online-Ausgabe der Briefe von und an Johann Georg Hamann.";
ViewData["showCredits"] = "false";
}
@@ -33,7 +34,10 @@
<div>@f.FileName</div>
<div>@f.GetLastModified()</div>
<div class="ha-filestatusicon">
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><title>check-bold</title><path fill="currentColor" d="M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">
<title>check-bold</title>
<path fill="currentColor" d="M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z" />
</svg>
</div>
</div>
} else if (Model.SyntaxCheck.ContainsKey(f.FileName)) {
@@ -41,7 +45,12 @@
<div>@f.FileName</div>
<div>@f.GetLastModified()</div>
<div class="ha-filestatusicon">
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><title>alert-decagram-outline</title><path d="M23,12L20.56,14.78L20.9,18.46L17.29,19.28L15.4,22.46L12,21L8.6,22.47L6.71,19.29L3.1,18.47L3.44,14.78L1,12L3.44,9.21L3.1,5.53L6.71,4.72L8.6,1.54L12,3L15.4,1.54L17.29,4.72L20.9,5.54L20.56,9.22L23,12M20.33,12L18.5,9.89L18.74,7.1L16,6.5L14.58,4.07L12,5.18L9.42,4.07L8,6.5L5.26,7.09L5.5,9.88L3.67,12L5.5,14.1L5.26,16.9L8,17.5L9.42,19.93L12,18.81L14.58,19.92L16,17.5L18.74,16.89L18.5,14.1L20.33,12M11,15H13V17H11V15M11,7H13V13H11V7" /></svg> </div>
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">
<title>alert-decagram-outline</title>
<path
d="M23,12L20.56,14.78L20.9,18.46L17.29,19.28L15.4,22.46L12,21L8.6,22.47L6.71,19.29L3.1,18.47L3.44,14.78L1,12L3.44,9.21L3.1,5.53L6.71,4.72L8.6,1.54L12,3L15.4,1.54L17.29,4.72L20.9,5.54L20.56,9.22L23,12M20.33,12L18.5,9.89L18.74,7.1L16,6.5L14.58,4.07L12,5.18L9.42,4.07L8,6.5L5.26,7.09L5.5,9.88L3.67,12L5.5,14.1L5.26,16.9L8,17.5L9.42,19.93L12,18.81L14.58,19.92L16,17.5L18.74,16.89L18.5,14.1L20.33,12M11,15H13V17H11V15M11,7H13V13H11V7" />
</svg>
</div>
</div>
<div class="ha-managedfileannotations">
<table>
@@ -64,7 +73,11 @@
<div>@f.FileName</div>
<div>@f.GetLastModified()</div>
<div class="ha-filestatusicon">
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><title>close-thick</title><path d="M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12L20 6.91Z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">
<title>close-thick</title>
<path
d="M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12L20 6.91Z" />
</svg>
</div>
</div>
<div class="ha-managedfileannotations">
@@ -86,7 +99,10 @@
<div>@f.FileName</div>
<div>@f.GetLastModified()</div>
<div class="ha-filestatusicon">
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><title>check-bold</title><path fill="currentColor" d="M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">
<title>check-bold</title>
<path fill="currentColor" d="M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z" />
</svg>
</div>
</div>
} else {
@@ -94,7 +110,11 @@
<div>@f.FileName</div>
<div>@f.GetLastModified()</div>
<div class="ha-filestatusicon">
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><title>close-thick</title><path d="M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12L20 6.91Z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">
<title>close-thick</title>
<path
d="M20 6.91L17.09 4L12 9.09L6.91 4L4 6.91L9.09 12L4 17.09L6.91 20L12 14.91L17.09 20L20 17.09L14.91 12L20 6.91Z" />
</svg>
</div>
</div>
}
@@ -106,7 +126,8 @@
</div>
<feature name="SyntaxCheck">
@if (Model.ValidState) {
<form class="ha-selectfilesform" asp-controller="API" asp-action="GetSyntaxCheck" onsubmit="GETSyntaxCheck(this);return false;" method="get" hx-boost="false">
<form class="ha-selectfilesform" asp-controller="API" asp-action="GetSyntaxCheck"
onsubmit="window.statehelper.GETSyntaxCheck(this);return false;" method="get" hx-boost="false">
<button type="submit" class="ha-scbutton" id="ha-scbutton">
Verweise & IDs prüfen
</button>
@@ -126,11 +147,14 @@
<div class="ha-filelistfieldset">
<div class="ha-filelistlegend">Auswahl verfügbarer Dateien</div>
@if(Model.HamannFiles != null && Model.HamannFiles.Any()) {
<form class="ha-selectfilesform" id="selecthamannfilesform" asp-controller="API" asp-action="SetInProduction" method="post" onsubmit="USESubmit(this);return false;" enctype="application/x-www-form-urlencoded">
<form class="ha-selectfilesform" id="selecthamannfilesform" asp-controller="API" asp-action="SetInProduction"
method="post" onsubmit="window.statehelper.POSTUsedFile(this);return false;"
enctype="application/x-www-form-urlencoded" hx-boost="false">
<div class="ha-filelistlist">
@if (!Model.ValidState) {
<div class="ha-filelistfile">
<input type="radio" disabled><div class="ha-filelistname"> Aktuelle Datei kann nicht geladen werden.</div>
<input type="radio" disabled>
<div class="ha-filelistname"> Aktuelle Datei kann nicht geladen werden.</div>
<div class="ha-filelistusedproduction">
<div class="ha-filelistproduction hue-rotate-180">Fehler</div>
</div>
@@ -139,7 +163,8 @@
@foreach (var file in Model.HamannFiles) {
<div class="ha-filelistfile">
@if (Model.ActiveFile != null) {
<input type="radio" id="@file.Name" name="file" value="@file.Name" @(file.Name == @Model.ActiveFile!.Name ? "checked='checked'" : "")>
<input type="radio" id="@file.Name" name="file" value="@file.Name" @(file.Name==@Model.ActiveFile!.Name
? "checked='checked'" : "" )>
} else {
<input type="radio" id="@file.Name" name="file" value="@file.Name">
}
@@ -169,6 +194,6 @@
</feature>
<script type="module">
import { startup_filelistform } from "/dist/scripts.js";
startup_filelistform();
import {XMLStateHelper} from "/dist/scripts.js";
window.statehelper = new XMLStateHelper();
</script>

View File

@@ -50,15 +50,17 @@
@if (Model.PDFFilePath != null)
{
<a class="ml-1" href="@Model.PDFFilePath">
<div class="inline-block bg-slate-100 hover:bg-slate-200 border px-1.5 rounded dark:bg-black ">Brief @Model.MetaData.Meta.ID</div>
<a class="ml-1" href="@Model.PDFFilePath" hx-boost="false">
<div class="inline-block bg-slate-100 hover:bg-slate-200 border px-1.5 rounded dark:bg-black ">Brief
@Model.MetaData.Meta.ID</div>
</a>
}
@if (Model.YearPDFFilePath != null)
{
<a class="ml-1 mr-2" href="@Model.YearPDFFilePath">
<div class="inline-block bg-slate-100 hover:bg-slate-200 border px-1.5 rounded dark:bg-black">Jahr @Model.MetaData.Meta.Sort.Year</div>
<a class="ml-1 mr-2" href="@Model.YearPDFFilePath" hx-boost="false">
<div class="inline-block bg-slate-100 hover:bg-slate-200 border px-1.5 rounded dark:bg-black">Jahr
@Model.MetaData.Meta.Sort.Year</div>
</a>
}
@@ -100,7 +102,8 @@
{
var mw = (text.MinWidth) ? "ha-minwidth" : "";
<div class="ha-appcontainer ha-appcontainer-@text.Number @mw">
@if (app.Item2.Count > 1 && !String.IsNullOrWhiteSpace(text.ParsedText) && !String.IsNullOrWhiteSpace(text.Title))
@if (app.Item2.Count > 1 && !String.IsNullOrWhiteSpace(text.ParsedText) &&
!String.IsNullOrWhiteSpace(text.Title))
{
<h3>@text.Title</h3>
}
@@ -143,7 +146,8 @@
{
<tr class="ha-handentry">
<td>
<div class="ha-handfrom">@hand.ParsedStart</div>@if (!String.IsNullOrEmpty(hand.ParsedEnd))
<div class="ha-handfrom">@hand.ParsedStart</div>@if
(!String.IsNullOrEmpty(hand.ParsedEnd))
{
<div class="ha-handto">@hand.ParsedEnd</div>
}
@@ -157,6 +161,7 @@
</div>
}
@if (Model.ParsedEdits != null)
{
<div class="ha-edits ha-appcontainer">
@@ -173,7 +178,8 @@
{
<tr>
<td class="ha-editfromto">
<div class="ha-editfrom">@edit.ParsedStart</div>@if (!String.IsNullOrEmpty(edit.ParsedEnd))
<div class="ha-editfrom">@edit.ParsedStart</div>@if
(!String.IsNullOrEmpty(edit.ParsedEnd))
{
<div class="ha-editto">@edit.ParsedEnd</div>
}

View File

@@ -8,7 +8,6 @@
"name": "haweb",
"version": "0.0.0",
"devDependencies": {
"@laynezh/vite-plugin-lib-assets": "^0.5.14",
"autoprefixer": "^10.4.7",
"cssnano": "^5.1.11",
"mark.js": "^8.11.1",
@@ -387,17 +386,6 @@
"node": ">=12"
}
},
"node_modules/@laynezh/vite-plugin-lib-assets": {
"version": "0.5.14",
"resolved": "https://registry.npmjs.org/@laynezh/vite-plugin-lib-assets/-/vite-plugin-lib-assets-0.5.14.tgz",
"integrity": "sha512-6GDawvUde8BixyDx/MD6kXrgXyH9ETlVZJ7czRK15ojoDzki1orWKvDhOhmdEra/SUxleUDMmBqAI5m8uGtuMQ==",
"dev": true,
"dependencies": {
"escape-string-regexp": "^4.0.0",
"loader-utils": "^3.2.1",
"mrmime": "^1.0.1"
}
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -1233,18 +1221,6 @@
"node": ">=6"
}
},
"node_modules/escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/fast-glob": {
"version": "3.2.11",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
@@ -1493,15 +1469,6 @@
"node": ">=10"
}
},
"node_modules/loader-utils": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz",
"integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==",
"dev": true,
"engines": {
"node": ">= 12.13.0"
}
},
"node_modules/lodash.memoize": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
@@ -1554,15 +1521,6 @@
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"node_modules/mrmime": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz",
"integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==",
"dev": true,
"engines": {
"node": ">=10"
}
},
"node_modules/nanoid": {
"version": "3.3.7",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
@@ -2903,17 +2861,6 @@
"dev": true,
"optional": true
},
"@laynezh/vite-plugin-lib-assets": {
"version": "0.5.14",
"resolved": "https://registry.npmjs.org/@laynezh/vite-plugin-lib-assets/-/vite-plugin-lib-assets-0.5.14.tgz",
"integrity": "sha512-6GDawvUde8BixyDx/MD6kXrgXyH9ETlVZJ7czRK15ojoDzki1orWKvDhOhmdEra/SUxleUDMmBqAI5m8uGtuMQ==",
"dev": true,
"requires": {
"escape-string-regexp": "^4.0.0",
"loader-utils": "^3.2.1",
"mrmime": "^1.0.1"
}
},
"@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -3471,12 +3418,6 @@
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
"dev": true
},
"escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true
},
"fast-glob": {
"version": "3.2.11",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
@@ -3655,12 +3596,6 @@
"integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==",
"dev": true
},
"loader-utils": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz",
"integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==",
"dev": true
},
"lodash.memoize": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
@@ -3707,12 +3642,6 @@
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"mrmime": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz",
"integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==",
"dev": true
},
"nanoid": {
"version": "3.3.7",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",

View File

@@ -1,45 +1,61 @@
const startup_filelistform = function () {
function getCookie(name) {
class XMLStateHelper {
constructor() {
var coll = document.getElementsByClassName("expandable");
for (let i = 0; i < coll.length; i++) {
let element = coll[i];
coll[i].addEventListener("click", () => {
element.classList.toggle("expanded");
});
}
}
getCookie(name) {
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
}
const USESubmit = async function (oFormElement, file = null) {
async POSTUsedFile(oFormElement, file = null) {
let fd = new FormData(oFormElement);
document.getElementById("ha-filelistbutton").style.pointerEvents = "none";
document.getElementById("ha-filelistbutton").classList.add("loading");
await fetch(oFormElement.action, {
method: 'POST',
method: "POST",
headers: {
'RequestVerificationToken': getCookie('RequestVerificationToken')
RequestVerificationToken: this.getCookie("RequestVerificationToken"),
},
body: fd
body: fd,
})
.then(response => response.json())
.then(json => {
document.getElementById("ha-filelistbutton").classList.remove("loading");
document.getElementById("ha-filelistbutton").style.pointerEvents = "auto";
.then((response) => response.json())
.then((json) => {
document
.getElementById("ha-filelistbutton")
.classList.remove("loading");
document.getElementById("ha-filelistbutton").style.pointerEvents =
"auto";
if ("Error" in json) {
document.getElementById("ha-filelistoutput").textContent = json.Error;
}
else {
document.getElementById("ha-filelistoutput").textContent =
json.Erroru;
} else {
location.reload();
}
})
.catch((e) => {
document.getElementById("ha-filelistbutton").classList.remove("loading");
document.getElementById("ha-filelistbutton").style.pointerEvents = "auto";
document
.getElementById("ha-filelistbutton")
.classList.remove("loading");
document.getElementById("ha-filelistbutton").style.pointerEvents =
"auto";
document.getElementById("ha-filelistoutput").textContent = e;
})
});
}
const GETSyntaxCheck = async function (oFormElement, file = null) {
async GETSyntaxCheck(oFormElement, file = null) {
document.getElementById("ha-scbutton").style.pointerEvents = "none";
document.getElementById("ha-scbutton").classList.toggle("loading");
await fetch(oFormElement.action)
.then(response => response.json())
.then(j => {
.then((response) => response.json())
.then((j) => {
Object.entries(j).forEach(([key, value]) => {
var e = document.getElementById(key);
if (e !== null && !e.classList.contains("red")) {
@@ -51,7 +67,10 @@ const startup_filelistform = function () {
} else {
var icon = i.querySelector("svg");
icon.remove();
i.insertAdjacentHTML("afterbegin", '<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><title>alert-decagram-outline</title><path d="M23,12L20.56,14.78L20.9,18.46L17.29,19.28L15.4,22.46L12,21L8.6,22.47L6.71,19.29L3.1,18.47L3.44,14.78L1,12L3.44,9.21L3.1,5.53L6.71,4.72L8.6,1.54L12,3L15.4,1.54L17.29,4.72L20.9,5.54L20.56,9.22L23,12M20.33,12L18.5,9.89L18.74,7.1L16,6.5L14.58,4.07L12,5.18L9.42,4.07L8,6.5L5.26,7.09L5.5,9.88L3.67,12L5.5,14.1L5.26,16.9L8,17.5L9.42,19.93L12,18.81L14.58,19.92L16,17.5L18.74,16.89L18.5,14.1L20.33,12M11,15H13V17H11V15M11,7H13V13H11V7" /></svg>');
i.insertAdjacentHTML(
"afterbegin",
'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><title>alert-decagram-outline</title><path d="M23,12L20.56,14.78L20.9,18.46L17.29,19.28L15.4,22.46L12,21L8.6,22.47L6.71,19.29L3.1,18.47L3.44,14.78L1,12L3.44,9.21L3.1,5.53L6.71,4.72L8.6,1.54L12,3L15.4,1.54L17.29,4.72L20.9,5.54L20.56,9.22L23,12M20.33,12L18.5,9.89L18.74,7.1L16,6.5L14.58,4.07L12,5.18L9.42,4.07L8,6.5L5.26,7.09L5.5,9.88L3.67,12L5.5,14.1L5.26,16.9L8,17.5L9.42,19.93L12,18.81L14.58,19.92L16,17.5L18.74,16.89L18.5,14.1L20.33,12M11,15H13V17H11V15M11,7H13V13H11V7" /></svg>',
);
h.classList.add("expandable");
h.classList.add("orange");
h.addEventListener("click", () => {
@@ -77,29 +96,21 @@ const startup_filelistform = function () {
tdm.append(error.message);
tr.append(tdl, tdc, tdm);
t.append(tr);
})
});
a.append(t);
}
}
console.log(e, h, i, a);
});
document.getElementById("ha-scbutton").classList.toggle("hidden");
})
.catch((e) => {
console.log(e);
document.getElementById("ha-scbutton").classList.toggle("loading");
document.getElementById("ha-scbutton").style.pointerEvents = "auto";
})
}
var coll = document.getElementsByClassName("expandable");
for (let i = 0; i < coll.length; i++) {
let element = coll[i]
coll[i].addEventListener("click", () => {
element.classList.toggle("expanded");
});
}
};
}
export { XMLStateHelper };
export { startup_filelistform };

View File

@@ -6,7 +6,7 @@ import { startup_markanchor } from "./anchor.mjs";
import { startup_mobilemenu } from "./mobilemenu.mjs";
import { startup_scrollbutton } from "./scrollbutton.mjs";
import { startup_clipboard } from "./clipboard.mjs";
import { startup_filelistform } from "./filelistform.mjs";
import { XMLStateHelper } from "./filelistform.mjs";
import { startup_index } from "./index.mjs";
import { startup_briefe } from "./briefe.mjs";
import { startup_websocket } from "./websocket.mjs";
@@ -20,14 +20,14 @@ const startup_default = function () {
startup_mobilemenu();
startup_markanchor();
startup_clipboard();
}
};
export {
startup_search,
startup_websocket,
startup_briefe,
startup_index,
startup_filelistform,
XMLStateHelper,
startup_default,
startup_clipboard,
startup_mobilemenu,
@@ -35,5 +35,6 @@ export {
startup_menu,
startup_scrollbutton,
startup_marginals,
startup_theme
startup_theme,
};