mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
BUGFIX: fehlende edits
This commit is contained in:
@@ -11,17 +11,20 @@ namespace HaDocument.Reactors {
|
|||||||
private Dictionary<string, string[]> _intermediateReasons = new Dictionary<string, string[]>();
|
private Dictionary<string, string[]> _intermediateReasons = new Dictionary<string, string[]>();
|
||||||
private bool _normalizeWhitespace = false;
|
private bool _normalizeWhitespace = false;
|
||||||
|
|
||||||
// State
|
// State for <etitreason>
|
||||||
private string Index = "";
|
private string Index = "";
|
||||||
|
|
||||||
|
// State for <letterText>
|
||||||
private string letter = "";
|
private string letter = "";
|
||||||
private string page = "";
|
private string page = "";
|
||||||
private string line = "";
|
private string line = "";
|
||||||
|
|
||||||
|
|
||||||
private Stack<string> index;
|
private Stack<string> index;
|
||||||
|
|
||||||
private ElementStringBinder _element = null;
|
private ElementStringBinder _element = null;
|
||||||
|
|
||||||
internal EditreasonReactor(IReader reader, IntermediateLibrary lib, bool normalizeWhitespace) : base (reader, lib) {
|
internal EditreasonReactor(IReader reader, IntermediateLibrary lib, bool normalizeWhitespace) : base(reader, lib) {
|
||||||
CreatedInstances = lib.Editreasons;
|
CreatedInstances = lib.Editreasons;
|
||||||
index = new Stack<string>();
|
index = new Stack<string>();
|
||||||
_normalizeWhitespace = normalizeWhitespace;
|
_normalizeWhitespace = normalizeWhitespace;
|
||||||
@@ -58,9 +61,9 @@ namespace HaDocument.Reactors {
|
|||||||
|
|
||||||
protected override void Listen(object sender, Tag tag) {
|
protected override void Listen(object sender, Tag tag) {
|
||||||
if (
|
if (
|
||||||
!tag.EndTag &&
|
!tag.EndTag &&
|
||||||
!tag.IsEmpty &&
|
!tag.IsEmpty &&
|
||||||
tag.Name == "editreason" &&
|
tag.Name == "editreason" &&
|
||||||
!String.IsNullOrWhiteSpace(tag["index"])
|
!String.IsNullOrWhiteSpace(tag["index"])
|
||||||
) {
|
) {
|
||||||
Activate(_reader, tag);
|
Activate(_reader, tag);
|
||||||
@@ -151,4 +154,4 @@ namespace HaDocument.Reactors {
|
|||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class Briefecontroller : Controller {
|
|||||||
var text = lib.Letters.ContainsKey(id) ? lib.Letters[id] : null;
|
var text = lib.Letters.ContainsKey(id) ? lib.Letters[id] : null;
|
||||||
var marginals = lib.Marginals.ContainsKey(id) ? lib.Marginals[id] : null;
|
var marginals = lib.Marginals.ContainsKey(id) ? lib.Marginals[id] : null;
|
||||||
var tradition = lib.Traditions.ContainsKey(id) ? lib.Traditions[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 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 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;
|
var prevmeta = meta != lib.MetasByDate.First() ? lib.MetasByDate.ItemRef(lib.MetasByDate.IndexOf(meta) - 1) : null;
|
||||||
@@ -76,22 +76,24 @@ public class Briefecontroller : Controller {
|
|||||||
t.Title = name;
|
t.Title = name;
|
||||||
if (!String.IsNullOrWhiteSpace(t.ParsedText)) {
|
if (!String.IsNullOrWhiteSpace(t.ParsedText)) {
|
||||||
if (texts == null) texts = new List<(string, List<Text>)>();
|
if (texts == null) texts = new List<(string, List<Text>)>();
|
||||||
if(!texts.Where(x => x.Category == category).Any())
|
if (!texts.Where(x => x.Category == category).Any())
|
||||||
texts.Add((category, new List<Text>() { t }));
|
texts.Add((category, new List<Text>() { t }));
|
||||||
else
|
else
|
||||||
texts.Where(x => x.Category == category).First().Item2.Add(t);
|
texts.Where(x => x.Category == category).First().Item2.Add(t);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
model.MetaData.HasText = false;
|
model.MetaData.HasText = false;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
model.MetaData.HasText = false;
|
model.MetaData.HasText = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tradition != null && !String.IsNullOrWhiteSpace(tradition.Element)) {
|
if (tradition != null && !String.IsNullOrWhiteSpace(tradition.Element)) {
|
||||||
var additions = XElement.Parse(tradition.Element, LoadOptions.PreserveWhitespace).Descendants("app");
|
var additions = XElement.Parse(tradition.Element, LoadOptions.PreserveWhitespace).Descendants("app");
|
||||||
foreach (var a in additions) {
|
foreach (var a in additions) {
|
||||||
var app = a.HasAttributes && a.Attribute("ref") != null && lib.Apps.ContainsKey(a.Attribute("ref").Value) ?
|
var app = a.HasAttributes && a.Attribute("ref") != null && lib.Apps.ContainsKey(a.Attribute("ref").Value) ?
|
||||||
lib.Apps[a.Attribute("ref").Value] :
|
lib.Apps[a.Attribute("ref").Value] :
|
||||||
null;
|
null;
|
||||||
if (app != null && !a.IsEmpty) {
|
if (app != null && !a.IsEmpty) {
|
||||||
var state = HaWeb.HTMLHelpers.LetterHelpers.ParseText(lib, _readerService, a, meta, marginals, hands, editreasons);
|
var state = HaWeb.HTMLHelpers.LetterHelpers.ParseText(lib, _readerService, a, meta, marginals, hands, editreasons);
|
||||||
@@ -100,14 +102,14 @@ public class Briefecontroller : Controller {
|
|||||||
t.ParsedMarginals = state.ParsedMarginals;
|
t.ParsedMarginals = state.ParsedMarginals;
|
||||||
t.ParsedText = state.sb.ToString();
|
t.ParsedText = state.sb.ToString();
|
||||||
if (texts == null) texts = new List<(string, List<Text>)>();
|
if (texts == null) texts = new List<(string, List<Text>)>();
|
||||||
if(!texts.Where(x => x.Category == app.Category).Any())
|
if (!texts.Where(x => x.Category == app.Category).Any())
|
||||||
texts.Add((app.Category, new List<Text>() { t }));
|
texts.Add((app.Category, new List<Text>() { t }));
|
||||||
else
|
else
|
||||||
texts.Where(x => x.Category == app.Category).First().Item2.Add(t);
|
texts.Where(x => x.Category == app.Category).First().Item2.Add(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
model.Texts = texts;
|
model.Texts = texts;
|
||||||
|
|
||||||
if (System.IO.File.Exists("./wwwroot/pdf/HKB_" + id + ".pdf")) {
|
if (System.IO.File.Exists("./wwwroot/pdf/HKB_" + id + ".pdf")) {
|
||||||
@@ -159,7 +161,8 @@ public class Briefecontroller : Controller {
|
|||||||
HTMLHelpers.StringHelpers.GetEnumerationString(receivers.Select(x => x.Name))
|
HTMLHelpers.StringHelpers.GetEnumerationString(receivers.Select(x => x.Name))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if (senders.Any(x => receivers.Contains(x))) {
|
if (senders.Any(x => receivers.Contains(x))) {
|
||||||
for (var i = 0; i < receivers.Count || i < senders.Count; i++) {
|
for (var i = 0; i < receivers.Count || i < senders.Count; i++) {
|
||||||
res.Add((
|
res.Add((
|
||||||
@@ -185,10 +188,10 @@ public class Briefecontroller : Controller {
|
|||||||
if (str == strlist.Last())
|
if (str == strlist.Last())
|
||||||
res += " und " + (str.Index == "1" ? "" : HTMLHelpers.TagHelpers.CreateElement("a", "", "/HKB/Person/" + str.Index)) + str.Name + (str.Index == "1" ? "" : HTMLHelpers.TagHelpers.CreateEndElement("a"));
|
res += " und " + (str.Index == "1" ? "" : HTMLHelpers.TagHelpers.CreateElement("a", "", "/HKB/Person/" + str.Index)) + str.Name + (str.Index == "1" ? "" : HTMLHelpers.TagHelpers.CreateEndElement("a"));
|
||||||
else
|
else
|
||||||
res += ", " + (str.Index == "1" ? "" :HTMLHelpers.TagHelpers.CreateElement("a", "", "/HKB/Person/" + str.Index)) + str.Name + (str.Index == "1" ? "" : HTMLHelpers.TagHelpers.CreateEndElement("a"));
|
res += ", " + (str.Index == "1" ? "" : HTMLHelpers.TagHelpers.CreateElement("a", "", "/HKB/Person/" + str.Index)) + str.Name + (str.Index == "1" ? "" : HTMLHelpers.TagHelpers.CreateEndElement("a"));
|
||||||
else
|
else
|
||||||
res += (str.Index == "1" ? "" : HTMLHelpers.TagHelpers.CreateElement("a", "", "/HKB/Person/" + str.Index)) + str.Name + (str.Index == "1" ? "" : HTMLHelpers.TagHelpers.CreateEndElement("a"));
|
res += (str.Index == "1" ? "" : HTMLHelpers.TagHelpers.CreateElement("a", "", "/HKB/Person/" + str.Index)) + str.Name + (str.Index == "1" ? "" : HTMLHelpers.TagHelpers.CreateEndElement("a"));
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,174 +1,199 @@
|
|||||||
@model XMLStateViewModel;
|
@model XMLStateViewModel;
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Syntax-Check & Dateien";
|
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.
|
||||||
ViewData["showCredits"] = "false";
|
Durchsuchbare Online-Ausgabe der Briefe von und an Johann Georg Hamann.";
|
||||||
|
ViewData["showCredits"] = "false";
|
||||||
}
|
}
|
||||||
|
|
||||||
@* TODO: Headers <div class="ha-xmlstateheader">
|
@* TODO: Headers <div class="ha-xmlstateheader">
|
||||||
<h1>XML-Daten</h1>
|
<h1>XML-Daten</h1>
|
||||||
</div> *@
|
</div> *@
|
||||||
@if (Model.ManagedFiles != null && Model.ManagedFiles.Any()) {
|
@if (Model.ManagedFiles != null && Model.ManagedFiles.Any()) {
|
||||||
<div class="ha-managedfiles">
|
<div class="ha-managedfiles">
|
||||||
<div class="ha-repo">
|
<div class="ha-repo">
|
||||||
<div class="ha-repodata">
|
<div class="ha-repodata">
|
||||||
<div><a href="https://github.com/Theodor-Springmann-Stiftung/hamann-xml">Repository →</a></div>
|
<div><a href="https://github.com/Theodor-Springmann-Stiftung/hamann-xml">Repository →</a></div>
|
||||||
@if (Model.GitData != null) {
|
@if (Model.GitData != null) {
|
||||||
<div>Commit @Model.GitData.Commit.Substring(0,7)</div>
|
<div>Commit @Model.GitData.Commit.Substring(0,7)</div>
|
||||||
<div>@Model.GitData.PullTime</div>
|
<div>@Model.GitData.PullTime</div>
|
||||||
}
|
}
|
||||||
</div>
|
|
||||||
<div class="ha-repofilecount">
|
|
||||||
@Model.ManagedFiles.Count XML-Dateien
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@* Syntax-Check cached? We provide the results. *@
|
|
||||||
@if (Model.SyntaxCheck != null) {
|
|
||||||
<div class="ha-managedfileslist">
|
|
||||||
@foreach (var f in Model.ManagedFiles) {
|
|
||||||
<div class="ha-managedfile" id="@f.FileName">
|
|
||||||
@if (Model.SyntaxCheck.ContainsKey(f.FileName) && Model.SyntaxCheck[f.FileName].Errors == null) {
|
|
||||||
<div class="ha-managedfileheader green">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
} else if (Model.SyntaxCheck.ContainsKey(f.FileName)) {
|
|
||||||
<div class="ha-managedfileheader expandable orange">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
<div class="ha-managedfileannotations">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th>Zeile</th>
|
|
||||||
<th>Spalte</th>
|
|
||||||
<th>Fehler</th>
|
|
||||||
</tr>
|
|
||||||
@foreach (var e in Model.SyntaxCheck[f.FileName]!.Errors) {
|
|
||||||
<tr>
|
|
||||||
<td>@e.Line</td>
|
|
||||||
<td>@e.Column</td>
|
|
||||||
<td>@e.Message</td>
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
} else {
|
|
||||||
<div class="ha-managedfileheader expandable expanded red">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ha-managedfileannotations">
|
|
||||||
@f.GetLog()
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
@* No SyntaxCheck? We provide the data + a button to load *@
|
|
||||||
else {
|
|
||||||
<div class="ha-managedfileslist">
|
|
||||||
@foreach (var f in Model.ManagedFiles) {
|
|
||||||
<div class="ha-managedfile" id="@f.FileName">
|
|
||||||
@if (f.IsValid) {
|
|
||||||
<div class="ha-managedfileheader">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
} else {
|
|
||||||
<div class="ha-managedfileheader expandable expanded red">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
<div class="ha-managedfileannotations">
|
|
||||||
@f.GetLog()
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</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">
|
|
||||||
<button type="submit" class="ha-scbutton" id="ha-scbutton" >
|
|
||||||
Verweise & IDs prüfen
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
}
|
|
||||||
</feature>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
} else {
|
<div class="ha-repofilecount">
|
||||||
|
@Model.ManagedFiles.Count XML-Dateien
|
||||||
<div class="ha-managedfilesnotfound">
|
|
||||||
Keine Dateien im Repository gefunden!
|
|
||||||
</div>
|
</div>
|
||||||
}
|
</div>
|
||||||
|
|
||||||
<feature name="LocalPublishService">
|
@* Syntax-Check cached? We provide the results. *@
|
||||||
<div class="ha-filelistfieldset">
|
@if (Model.SyntaxCheck != null) {
|
||||||
<div class="ha-filelistlegend">Auswahl verfügbarer Dateien</div>
|
<div class="ha-managedfileslist">
|
||||||
@if(Model.HamannFiles != null && Model.HamannFiles.Any()) {
|
@foreach (var f in Model.ManagedFiles) {
|
||||||
<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">
|
<div class="ha-managedfile" id="@f.FileName">
|
||||||
<div class="ha-filelistlist">
|
@if (Model.SyntaxCheck.ContainsKey(f.FileName) && Model.SyntaxCheck[f.FileName].Errors == null) {
|
||||||
@if (!Model.ValidState) {
|
<div class="ha-managedfileheader green">
|
||||||
<div class="ha-filelistfile">
|
<div>@f.FileName</div>
|
||||||
<input type="radio" disabled><div class="ha-filelistname"> Aktuelle Datei kann nicht geladen werden.</div>
|
<div>@f.GetLastModified()</div>
|
||||||
<div class="ha-filelistusedproduction">
|
<div class="ha-filestatusicon">
|
||||||
<div class="ha-filelistproduction hue-rotate-180">Fehler</div>
|
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">
|
||||||
</div>
|
<title>check-bold</title>
|
||||||
</div>
|
<path fill="currentColor" d="M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z" />
|
||||||
}
|
</svg>
|
||||||
@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'" : "")>
|
|
||||||
} else {
|
|
||||||
<input type="radio" id="@file.Name" name="file" value="@file.Name">
|
|
||||||
}
|
|
||||||
<div class="ha-filelistname">@file.Name</div>
|
|
||||||
@if (Model.ActiveFile != null && file.Name == Model.ActiveFile!.Name) {
|
|
||||||
<div class="ha-filelistusedproduction">
|
|
||||||
<div class="ha-filelistproduction">geladen</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
@* // TODO Metadata
|
|
||||||
// TODO DELETE *@
|
|
||||||
<div class="ha-filelistmodified">@file.LastModified.LocalDateTime</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
<output id ="ha-filelistoutput"></output>
|
</div>
|
||||||
<button type="submit" class="ha-filelistbutton" id="ha-filelistbutton" >
|
} else if (Model.SyntaxCheck.ContainsKey(f.FileName)) {
|
||||||
Laden
|
<div class="ha-managedfileheader expandable orange">
|
||||||
<div class="ha-lds-ellipsis-load" id="ha-lds-ellipsis-load"></div>
|
<div>@f.FileName</div>
|
||||||
</button>
|
<div>@f.GetLastModified()</div>
|
||||||
</form>
|
<div class="ha-filestatusicon">
|
||||||
}
|
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">
|
||||||
else {
|
<title>alert-decagram-outline</title>
|
||||||
<div>Keine Dateien gefunden! Es wird eine fallback-Datei verwendet!</div>
|
<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>
|
||||||
|
<tr>
|
||||||
|
<th>Zeile</th>
|
||||||
|
<th>Spalte</th>
|
||||||
|
<th>Fehler</th>
|
||||||
|
</tr>
|
||||||
|
@foreach (var e in Model.SyntaxCheck[f.FileName]!.Errors) {
|
||||||
|
<tr>
|
||||||
|
<td>@e.Line</td>
|
||||||
|
<td>@e.Column</td>
|
||||||
|
<td>@e.Message</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
} else {
|
||||||
|
<div class="ha-managedfileheader expandable expanded red">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ha-managedfileannotations">
|
||||||
|
@f.GetLog()
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</feature>
|
}
|
||||||
|
|
||||||
<script type="module">
|
@* No SyntaxCheck? We provide the data + a button to load *@
|
||||||
import { startup_filelistform } from "/dist/scripts.js";
|
else {
|
||||||
startup_filelistform();
|
<div class="ha-managedfileslist">
|
||||||
</script>
|
@foreach (var f in Model.ManagedFiles) {
|
||||||
|
<div class="ha-managedfile" id="@f.FileName">
|
||||||
|
@if (f.IsValid) {
|
||||||
|
<div class="ha-managedfileheader">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
} else {
|
||||||
|
<div class="ha-managedfileheader expandable expanded red">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
<div class="ha-managedfileannotations">
|
||||||
|
@f.GetLog()
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<feature name="SyntaxCheck">
|
||||||
|
@if (Model.ValidState) {
|
||||||
|
<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>
|
||||||
|
</form>
|
||||||
|
}
|
||||||
|
</feature>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
} else {
|
||||||
|
|
||||||
|
<div class="ha-managedfilesnotfound">
|
||||||
|
Keine Dateien im Repository gefunden!
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
<feature name="LocalPublishService">
|
||||||
|
<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="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>
|
||||||
|
<div class="ha-filelistusedproduction">
|
||||||
|
<div class="ha-filelistproduction hue-rotate-180">Fehler</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
@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'" : "" )>
|
||||||
|
} else {
|
||||||
|
<input type="radio" id="@file.Name" name="file" value="@file.Name">
|
||||||
|
}
|
||||||
|
<div class="ha-filelistname">@file.Name</div>
|
||||||
|
@if (Model.ActiveFile != null && file.Name == Model.ActiveFile!.Name) {
|
||||||
|
<div class="ha-filelistusedproduction">
|
||||||
|
<div class="ha-filelistproduction">geladen</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
@* // TODO Metadata
|
||||||
|
// TODO DELETE *@
|
||||||
|
<div class="ha-filelistmodified">@file.LastModified.LocalDateTime</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<output id="ha-filelistoutput"></output>
|
||||||
|
<button type="submit" class="ha-filelistbutton" id="ha-filelistbutton">
|
||||||
|
Laden
|
||||||
|
<div class="ha-lds-ellipsis-load" id="ha-lds-ellipsis-load"></div>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
<div>Keine Dateien gefunden! Es wird eine fallback-Datei verwendet!</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<script type="module">
|
||||||
|
import {XMLStateHelper} from "/dist/scripts.js";
|
||||||
|
window.statehelper = new XMLStateHelper();
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
@model BriefeViewModel;
|
@model BriefeViewModel;
|
||||||
@{
|
@{
|
||||||
@* var minwidth = "";
|
@* var minwidth = "";
|
||||||
if (Model.MinWidth)
|
if (Model.MinWidth)
|
||||||
minwidth = "ha-minwidth";
|
minwidth = "ha-minwidth";
|
||||||
var minwidthtrads = "";
|
var minwidthtrads = "";
|
||||||
if (Model.MinWidthTrad)
|
if (Model.MinWidthTrad)
|
||||||
minwidthtrads = "ha-minwidth"; *@
|
minwidthtrads = "ha-minwidth"; *@
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="ha-letterheader">
|
<div class="ha-letterheader">
|
||||||
@await Html.PartialAsync("/Views/Shared/_LetterHead.cshtml", (Model.MetaData, true, false))
|
@await Html.PartialAsync("/Views/Shared/_LetterHead.cshtml", (Model.MetaData, true, false))
|
||||||
@@ -15,77 +15,79 @@
|
|||||||
<select id="ha-switchlettercategory">
|
<select id="ha-switchlettercategory">
|
||||||
@foreach (var app in Model.Texts)
|
@foreach (var app in Model.Texts)
|
||||||
{
|
{
|
||||||
@if (app.Category != Model.DefaultCategory)
|
@if (app.Category != Model.DefaultCategory)
|
||||||
{
|
{
|
||||||
<option class="ha-tabbtn" autocomplete="off">@app.Category</option>
|
<option class="ha-tabbtn" autocomplete="off">@app.Category</option>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any())
|
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any())
|
||||||
{
|
{
|
||||||
<option class="ha-tabbtn" autocomplete="off">@Model.DefaultCategory</option>
|
<option class="ha-tabbtn" autocomplete="off">@Model.DefaultCategory</option>
|
||||||
}
|
}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="ha-lettertabs !hidden md:!block">
|
<div class="ha-lettertabs !hidden md:!block">
|
||||||
@foreach (var app in Model.Texts)
|
@foreach (var app in Model.Texts)
|
||||||
{
|
{
|
||||||
@if (app.Category != Model.DefaultCategory)
|
@if (app.Category != Model.DefaultCategory)
|
||||||
{
|
{
|
||||||
<a class="ha-tabbtn hidden md:inline-block">@app.Category</a>
|
<a class="ha-tabbtn hidden md:inline-block">@app.Category</a>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any())
|
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any())
|
||||||
{
|
{
|
||||||
<a class="ha-tabbtn hidden md:inline-block">@Model.DefaultCategory</a>
|
<a class="ha-tabbtn hidden md:inline-block">@Model.DefaultCategory</a>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (Model.PDFFilePath != null || Model.YearPDFFilePath != null)
|
@if (Model.PDFFilePath != null || Model.YearPDFFilePath != null)
|
||||||
|
{
|
||||||
|
<div class="self-end mr-4 hidden md:block mb-1 text-base">
|
||||||
|
<span class="caps-petite">PDF:</span>
|
||||||
|
|
||||||
|
@if (Model.PDFFilePath != null)
|
||||||
{
|
{
|
||||||
<div class="self-end mr-4 hidden md:block mb-1 text-base">
|
|
||||||
<span class="caps-petite">PDF:</span>
|
|
||||||
|
|
||||||
@if (Model.PDFFilePath != null)
|
<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 class="ml-1" href="@Model.PDFFilePath">
|
</a>
|
||||||
<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>
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if (Model.YearPDFFilePath != null)
|
||||||
|
{
|
||||||
|
<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>
|
||||||
|
}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
@if (Model.MetaData.Next != null || Model.MetaData.Prev != null)
|
@if (Model.MetaData.Next != null || Model.MetaData.Prev != null)
|
||||||
{
|
{
|
||||||
<div class="ha-lettermetalinks">
|
<div class="ha-lettermetalinks">
|
||||||
@if (Model.MetaData.Prev != null)
|
@if (Model.MetaData.Prev != null)
|
||||||
{
|
{
|
||||||
<a href="@Model.MetaData.Prev.Value.Item2">
|
<a href="@Model.MetaData.Prev.Value.Item2">
|
||||||
@Model.MetaData.Prev.Value.Model.Meta.ID ◀
|
@Model.MetaData.Prev.Value.Model.Meta.ID ◀
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="ha-hkb">
|
<div class="ha-hkb">
|
||||||
HKB
|
HKB
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (Model.MetaData.Next != null)
|
@if (Model.MetaData.Next != null)
|
||||||
{
|
{
|
||||||
<a href="@Model.MetaData.Next.Value.Item2">
|
<a href="@Model.MetaData.Next.Value.Item2">
|
||||||
▶ @Model.MetaData.Next.Value.Model.Meta.ID
|
▶ @Model.MetaData.Next.Value.Model.Meta.ID
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -93,113 +95,117 @@
|
|||||||
<div class="ha-letterbody" id="ha-letterbody">
|
<div class="ha-letterbody" id="ha-letterbody">
|
||||||
@foreach (var app in Model.Texts)
|
@foreach (var app in Model.Texts)
|
||||||
{
|
{
|
||||||
@if (app.Category != Model.DefaultCategory)
|
@if (app.Category != Model.DefaultCategory)
|
||||||
{
|
{
|
||||||
<div class="ha-tab">
|
<div class="ha-tab">
|
||||||
@foreach (var text in app.Item2)
|
@foreach (var text in app.Item2)
|
||||||
{
|
{
|
||||||
var mw = (text.MinWidth) ? "ha-minwidth" : "";
|
var mw = (text.MinWidth) ? "ha-minwidth" : "";
|
||||||
<div class="ha-appcontainer ha-appcontainer-@text.Number @mw">
|
<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>
|
{
|
||||||
}
|
<h3>@text.Title</h3>
|
||||||
@if (!String.IsNullOrWhiteSpace(text.ParsedText))
|
}
|
||||||
{
|
@if (!String.IsNullOrWhiteSpace(text.ParsedText))
|
||||||
@Html.Raw(text.ParsedText)
|
{
|
||||||
}
|
@Html.Raw(text.ParsedText)
|
||||||
</div>
|
}
|
||||||
}
|
</div>
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any())
|
@if (Model.Texts != null && Model.Texts.Where(x => x.Category == Model.DefaultCategory).Any())
|
||||||
{
|
{
|
||||||
<div class="ha-tab ha-defaulttab">
|
<div class="ha-tab ha-defaulttab">
|
||||||
@foreach (var text in Model.Texts.Where(x => x.Category == Model.DefaultCategory).First().Item2)
|
@foreach (var text in Model.Texts.Where(x => x.Category == Model.DefaultCategory).First().Item2)
|
||||||
|
{
|
||||||
|
var mw = (text.MinWidth) ? "ha-minwidth" : "";
|
||||||
|
<div class="ha-appcontainer ha-appcontainer-@text.Number @mw">
|
||||||
|
@if (!String.IsNullOrWhiteSpace(text.ParsedText) && !String.IsNullOrWhiteSpace(text.Title))
|
||||||
{
|
{
|
||||||
var mw = (text.MinWidth) ? "ha-minwidth" : "";
|
<h3>@text.Title</h3>
|
||||||
<div class="ha-appcontainer ha-appcontainer-@text.Number @mw">
|
|
||||||
@if (!String.IsNullOrWhiteSpace(text.ParsedText) && !String.IsNullOrWhiteSpace(text.Title))
|
|
||||||
{
|
|
||||||
<h3>@text.Title</h3>
|
|
||||||
}
|
|
||||||
@if (!String.IsNullOrWhiteSpace(text.ParsedText))
|
|
||||||
{
|
|
||||||
@Html.Raw(text.ParsedText)
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
@if (!String.IsNullOrWhiteSpace(text.ParsedText))
|
||||||
|
{
|
||||||
|
@Html.Raw(text.ParsedText)
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
@if (Model.ParsedHands != null && Model.ParsedHands.Any())
|
@if (Model.ParsedHands != null && Model.ParsedHands.Any())
|
||||||
{
|
{
|
||||||
<div class="ha-hands ha-appcontainer">
|
<div class="ha-hands ha-appcontainer">
|
||||||
<h3>Zusätze fremder Hand</h3>
|
<h3>Zusätze fremder Hand</h3>
|
||||||
<div class="ha-app">
|
<div class="ha-app">
|
||||||
<div class="ha-handentries">
|
<div class="ha-handentries">
|
||||||
<table>
|
<table>
|
||||||
@foreach (var hand in Model.ParsedHands)
|
@foreach (var hand in Model.ParsedHands)
|
||||||
|
{
|
||||||
|
<tr class="ha-handentry">
|
||||||
|
<td>
|
||||||
|
<div class="ha-handfrom">@hand.ParsedStart</div>@if
|
||||||
|
(!String.IsNullOrEmpty(hand.ParsedEnd))
|
||||||
{
|
{
|
||||||
<tr class="ha-handentry">
|
<div class="ha-handto">–@hand.ParsedEnd</div>
|
||||||
<td>
|
|
||||||
<div class="ha-handfrom">@hand.ParsedStart</div>@if (!String.IsNullOrEmpty(hand.ParsedEnd))
|
|
||||||
{
|
|
||||||
<div class="ha-handto">–@hand.ParsedEnd</div>
|
|
||||||
}
|
|
||||||
</td>
|
|
||||||
<td class="ha-handperson">@Html.Raw(@hand.Person)</td>
|
|
||||||
</tr>
|
|
||||||
}
|
}
|
||||||
</table>
|
</td>
|
||||||
</div>
|
<td class="ha-handperson">@Html.Raw(@hand.Person)</td>
|
||||||
</div>
|
</tr>
|
||||||
|
}
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
}
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
@if (Model.ParsedEdits != null)
|
|
||||||
{
|
@if (Model.ParsedEdits != null)
|
||||||
<div class="ha-edits ha-appcontainer">
|
{
|
||||||
<h3>Textkritische Anmerkungen</h3>
|
<div class="ha-edits ha-appcontainer">
|
||||||
<div class="ha-editsinfo">Der Brieftext wurde anhand der überlieferten Quellen (vgl. Provenienz) kritisch
|
<h3>Textkritische Anmerkungen</h3>
|
||||||
geprüft. Notwendige Korrekturen gegenüber dem in ZH gedruckten Text wurden vorgenommen und sind
|
<div class="ha-editsinfo">Der Brieftext wurde anhand der überlieferten Quellen (vgl. Provenienz) kritisch
|
||||||
vollständig annotiert. Die in den beiden Auflagen von ZH angehängten Korrekturvorschläge werden
|
geprüft. Notwendige Korrekturen gegenüber dem in ZH gedruckten Text wurden vorgenommen und sind
|
||||||
vollständig aufgelistet, werden aber nur dann im Text realisiert, sofern diese anhand überlieferter
|
vollständig annotiert. Die in den beiden Auflagen von ZH angehängten Korrekturvorschläge werden
|
||||||
Quellen verifiziert werden konnten.</div>
|
vollständig aufgelistet, werden aber nur dann im Text realisiert, sofern diese anhand überlieferter
|
||||||
<div class="ha-app">
|
Quellen verifiziert werden konnten.</div>
|
||||||
<div class="ha-editentries">
|
<div class="ha-app">
|
||||||
<table>
|
<div class="ha-editentries">
|
||||||
@foreach (var edit in Model.ParsedEdits)
|
<table>
|
||||||
|
@foreach (var edit in Model.ParsedEdits)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td class="ha-editfromto">
|
||||||
|
<div class="ha-editfrom">@edit.ParsedStart</div>@if
|
||||||
|
(!String.IsNullOrEmpty(edit.ParsedEnd))
|
||||||
{
|
{
|
||||||
<tr>
|
<div class="ha-editto">–@edit.ParsedEnd</div>
|
||||||
<td class="ha-editfromto">
|
|
||||||
<div class="ha-editfrom">@edit.ParsedStart</div>@if (!String.IsNullOrEmpty(edit.ParsedEnd))
|
|
||||||
{
|
|
||||||
<div class="ha-editto">–@edit.ParsedEnd</div>
|
|
||||||
}
|
|
||||||
</td>
|
|
||||||
<td class="ha-editreference">
|
|
||||||
@if (!String.IsNullOrWhiteSpace(edit.Text) && !String.IsNullOrWhiteSpace(edit.Preview))
|
|
||||||
{
|
|
||||||
<span>
|
|
||||||
@Html.Raw(@edit.Preview)]
|
|
||||||
</span>
|
|
||||||
}
|
|
||||||
</td>
|
|
||||||
<td class="ha-editreas">
|
|
||||||
@Html.Raw(@edit.Text)
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
}
|
}
|
||||||
</table>
|
</td>
|
||||||
</div>
|
<td class="ha-editreference">
|
||||||
</div>
|
@if (!String.IsNullOrWhiteSpace(edit.Text) && !String.IsNullOrWhiteSpace(edit.Preview))
|
||||||
</div>
|
{
|
||||||
}
|
<span>
|
||||||
|
@Html.Raw(@edit.Preview)]
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
<td class="ha-editreas">
|
||||||
|
@Html.Raw(@edit.Text)
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { startup_briefe } from "/dist/scripts.js";
|
import {startup_briefe} from "/dist/scripts.js";
|
||||||
startup_briefe();
|
startup_briefe();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
71
HaWeb/package-lock.json
generated
71
HaWeb/package-lock.json
generated
@@ -8,7 +8,6 @@
|
|||||||
"name": "haweb",
|
"name": "haweb",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@laynezh/vite-plugin-lib-assets": "^0.5.14",
|
|
||||||
"autoprefixer": "^10.4.7",
|
"autoprefixer": "^10.4.7",
|
||||||
"cssnano": "^5.1.11",
|
"cssnano": "^5.1.11",
|
||||||
"mark.js": "^8.11.1",
|
"mark.js": "^8.11.1",
|
||||||
@@ -387,17 +386,6 @@
|
|||||||
"node": ">=12"
|
"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": {
|
"node_modules/@nodelib/fs.scandir": {
|
||||||
"version": "2.1.5",
|
"version": "2.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||||
@@ -1233,18 +1221,6 @@
|
|||||||
"node": ">=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": {
|
"node_modules/fast-glob": {
|
||||||
"version": "3.2.11",
|
"version": "3.2.11",
|
||||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
|
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
|
||||||
@@ -1493,15 +1469,6 @@
|
|||||||
"node": ">=10"
|
"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": {
|
"node_modules/lodash.memoize": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
|
||||||
@@ -1554,15 +1521,6 @@
|
|||||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
||||||
"dev": true
|
"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": {
|
"node_modules/nanoid": {
|
||||||
"version": "3.3.7",
|
"version": "3.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
||||||
@@ -2903,17 +2861,6 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": 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": {
|
"@nodelib/fs.scandir": {
|
||||||
"version": "2.1.5",
|
"version": "2.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||||
@@ -3471,12 +3418,6 @@
|
|||||||
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
|
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
|
||||||
"dev": true
|
"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": {
|
"fast-glob": {
|
||||||
"version": "3.2.11",
|
"version": "3.2.11",
|
||||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
|
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
|
||||||
@@ -3655,12 +3596,6 @@
|
|||||||
"integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==",
|
"integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==",
|
||||||
"dev": true
|
"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": {
|
"lodash.memoize": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
|
||||||
@@ -3707,12 +3642,6 @@
|
|||||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
||||||
"dev": true
|
"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": {
|
"nanoid": {
|
||||||
"version": "3.3.7",
|
"version": "3.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
||||||
|
|||||||
@@ -1,105 +1,116 @@
|
|||||||
const startup_filelistform = function () {
|
class XMLStateHelper {
|
||||||
function getCookie(name) {
|
constructor() {
|
||||||
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) {
|
|
||||||
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',
|
|
||||||
headers: {
|
|
||||||
'RequestVerificationToken': getCookie('RequestVerificationToken')
|
|
||||||
},
|
|
||||||
body: fd
|
|
||||||
})
|
|
||||||
.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 {
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
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) {
|
|
||||||
document.getElementById("ha-scbutton").style.pointerEvents = "none";
|
|
||||||
document.getElementById("ha-scbutton").classList.toggle("loading");
|
|
||||||
await fetch(oFormElement.action)
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(j => {
|
|
||||||
Object.entries(j).forEach(([key, value]) => {
|
|
||||||
var e = document.getElementById(key);
|
|
||||||
if (e !== null && !e.classList.contains("red")) {
|
|
||||||
var h = e.querySelector(".ha-managedfileheader");
|
|
||||||
var i = e.querySelector(".ha-filestatusicon");
|
|
||||||
var a = e.querySelector(".ha-managedfileannotations");
|
|
||||||
if (value.errors === null) {
|
|
||||||
h.classList.add("green");
|
|
||||||
} 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>');
|
|
||||||
h.classList.add("expandable");
|
|
||||||
h.classList.add("orange");
|
|
||||||
h.addEventListener("click", () => {
|
|
||||||
h.classList.toggle("expanded");
|
|
||||||
});
|
|
||||||
var t = document.createElement("table");
|
|
||||||
var thr = document.createElement("tr");
|
|
||||||
var thl = document.createElement("th");
|
|
||||||
var thc = document.createElement("th");
|
|
||||||
var thm = document.createElement("th");
|
|
||||||
thl.append("Zeile");
|
|
||||||
thc.append("Spalte");
|
|
||||||
thm.append("Fehler");
|
|
||||||
thr.append(thl, thc, thm);
|
|
||||||
t.append(thr);
|
|
||||||
value.errors.forEach((error) => {
|
|
||||||
var tr = document.createElement("tr");
|
|
||||||
var tdl = document.createElement("td");
|
|
||||||
var tdc = document.createElement("td");
|
|
||||||
var tdm = document.createElement("td");
|
|
||||||
tdl.append(error.line);
|
|
||||||
tdc.append(error.column);
|
|
||||||
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");
|
var coll = document.getElementsByClassName("expandable");
|
||||||
for (let i = 0; i < coll.length; i++) {
|
for (let i = 0; i < coll.length; i++) {
|
||||||
let element = coll[i]
|
let element = coll[i];
|
||||||
coll[i].addEventListener("click", () => {
|
coll[i].addEventListener("click", () => {
|
||||||
element.classList.toggle("expanded");
|
element.classList.toggle("expanded");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
getCookie(name) {
|
||||||
|
var value = "; " + document.cookie;
|
||||||
|
var parts = value.split("; " + name + "=");
|
||||||
|
if (parts.length == 2) return parts.pop().split(";").shift();
|
||||||
|
}
|
||||||
|
|
||||||
|
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",
|
||||||
|
headers: {
|
||||||
|
RequestVerificationToken: this.getCookie("RequestVerificationToken"),
|
||||||
|
},
|
||||||
|
body: fd,
|
||||||
|
})
|
||||||
|
.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.Erroru;
|
||||||
|
} else {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
document
|
||||||
|
.getElementById("ha-filelistbutton")
|
||||||
|
.classList.remove("loading");
|
||||||
|
document.getElementById("ha-filelistbutton").style.pointerEvents =
|
||||||
|
"auto";
|
||||||
|
document.getElementById("ha-filelistoutput").textContent = e;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
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) => {
|
||||||
|
Object.entries(j).forEach(([key, value]) => {
|
||||||
|
var e = document.getElementById(key);
|
||||||
|
if (e !== null && !e.classList.contains("red")) {
|
||||||
|
var h = e.querySelector(".ha-managedfileheader");
|
||||||
|
var i = e.querySelector(".ha-filestatusicon");
|
||||||
|
var a = e.querySelector(".ha-managedfileannotations");
|
||||||
|
if (value.errors === null) {
|
||||||
|
h.classList.add("green");
|
||||||
|
} 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>',
|
||||||
|
);
|
||||||
|
h.classList.add("expandable");
|
||||||
|
h.classList.add("orange");
|
||||||
|
h.addEventListener("click", () => {
|
||||||
|
h.classList.toggle("expanded");
|
||||||
|
});
|
||||||
|
var t = document.createElement("table");
|
||||||
|
var thr = document.createElement("tr");
|
||||||
|
var thl = document.createElement("th");
|
||||||
|
var thc = document.createElement("th");
|
||||||
|
var thm = document.createElement("th");
|
||||||
|
thl.append("Zeile");
|
||||||
|
thc.append("Spalte");
|
||||||
|
thm.append("Fehler");
|
||||||
|
thr.append(thl, thc, thm);
|
||||||
|
t.append(thr);
|
||||||
|
value.errors.forEach((error) => {
|
||||||
|
var tr = document.createElement("tr");
|
||||||
|
var tdl = document.createElement("td");
|
||||||
|
var tdc = document.createElement("td");
|
||||||
|
var tdm = document.createElement("td");
|
||||||
|
tdl.append(error.line);
|
||||||
|
tdc.append(error.column);
|
||||||
|
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";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export { XMLStateHelper };
|
||||||
|
|
||||||
export { startup_filelistform };
|
|
||||||
@@ -6,34 +6,35 @@ import { startup_markanchor } from "./anchor.mjs";
|
|||||||
import { startup_mobilemenu } from "./mobilemenu.mjs";
|
import { startup_mobilemenu } from "./mobilemenu.mjs";
|
||||||
import { startup_scrollbutton } from "./scrollbutton.mjs";
|
import { startup_scrollbutton } from "./scrollbutton.mjs";
|
||||||
import { startup_clipboard } from "./clipboard.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_index } from "./index.mjs";
|
||||||
import { startup_briefe } from "./briefe.mjs";
|
import { startup_briefe } from "./briefe.mjs";
|
||||||
import { startup_websocket } from "./websocket.mjs";
|
import { startup_websocket } from "./websocket.mjs";
|
||||||
import { startup_search } from "./search.mjs";
|
import { startup_search } from "./search.mjs";
|
||||||
|
|
||||||
const startup_default = function () {
|
const startup_default = function () {
|
||||||
startup_marginals();
|
startup_marginals();
|
||||||
startup_theme();
|
startup_theme();
|
||||||
startup_scrollbutton();
|
startup_scrollbutton();
|
||||||
startup_menu();
|
startup_menu();
|
||||||
startup_mobilemenu();
|
startup_mobilemenu();
|
||||||
startup_markanchor();
|
startup_markanchor();
|
||||||
startup_clipboard();
|
startup_clipboard();
|
||||||
}
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
startup_search,
|
startup_search,
|
||||||
startup_websocket,
|
startup_websocket,
|
||||||
startup_briefe,
|
startup_briefe,
|
||||||
startup_index,
|
startup_index,
|
||||||
startup_filelistform,
|
XMLStateHelper,
|
||||||
startup_default,
|
startup_default,
|
||||||
startup_clipboard,
|
startup_clipboard,
|
||||||
startup_mobilemenu,
|
startup_mobilemenu,
|
||||||
startup_markanchor,
|
startup_markanchor,
|
||||||
startup_menu,
|
startup_menu,
|
||||||
startup_scrollbutton,
|
startup_scrollbutton,
|
||||||
startup_marginals,
|
startup_marginals,
|
||||||
startup_theme
|
startup_theme,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user