repaired Modal-Window of DTC-Table in WebUI

This commit is contained in:
2024-01-11 17:18:00 +01:00
parent 286ba1fe6c
commit b79c4bd60f
2 changed files with 30 additions and 25 deletions

View File

@@ -10,28 +10,5 @@ document
nextSibling.innerText = fileName;
});
$("table").on("click", "tr[data-dtc]", function () {
var dtc = $(this).data("dtc");
var debugval = $(this).data("debugval");
var modal = $("#dtcModal");
getDescriptionForDTCNumber(dtc, function (error, title, description) {
if (error) {
console.error("Fehler beim Abrufen der Beschreibung:", error);
modal.find(".modal-title").text("Fehler");
modal
.find(".dtc-desc")
.text("DTC-Beschreibung konnte nicht geladen werden");
} else {
modal.find(".modal-title").text(title);
modal.find(".dtc-desc").text(description);
if (debugval > 0) {
modal.find(".dtc-debugval").text("Debugvalue: " + debugval);
} else {
modal.find(".dtc-debugval").remove();
}
}
});
// Modal anzeigen
modal.modal("show");
});