Update iOS webapp styling and backend target
This commit is contained in:
@@ -3,10 +3,13 @@
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fertigungsbaum</title>
|
||||
<script src="/backend/xlsx/xlsx.full.min.js"></script>
|
||||
<script src="/backend/excel-preview.js"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<title>Fertigungsbaum</title>
|
||||
<script src="/backend/xlsx/xlsx.full.min.js"></script>
|
||||
<script src="/backend/handsontable/handsontable/dist/handsontable.full.min.js"></script>
|
||||
<link rel="stylesheet" href="/backend/handsontable/handsontable/dist/handsontable.full.min.css">
|
||||
<link rel="stylesheet" href="/backend/jstree/dist/themes/default/style.min.css" />
|
||||
<link rel="stylesheet" href="/backend/ios.css">
|
||||
<script src="/backend/jquery/jquery-3.7.1.min.js"></script>
|
||||
<script src="/backend/jstree/dist/jstree.min.js"></script>
|
||||
|
||||
@@ -134,7 +137,6 @@
|
||||
overflow: hidden; /* Kein Scrollen auf dem Container selbst */
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/backend/ios.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="config-modal">
|
||||
@@ -236,38 +238,29 @@
|
||||
});
|
||||
}
|
||||
|
||||
function importExcelData() {
|
||||
function importExcelData() {
|
||||
const fileInput = document.getElementById("file-input");
|
||||
if (!fileInput.files.length) return;
|
||||
|
||||
const reader = new FileReader();
|
||||
reader.onload = function (event) {
|
||||
reader.onload = function(event) {
|
||||
const workbook = XLSX.read(event.target.result, { type: "binary" });
|
||||
const sheet = workbook.Sheets[workbook.SheetNames[0]];
|
||||
const data = XLSX.utils.sheet_to_json(sheet);
|
||||
rawTable = data;
|
||||
|
||||
// Rohdaten als Objekte
|
||||
const data = XLSX.utils.sheet_to_json(sheet, { defval: "" });
|
||||
|
||||
// ✅ Leere Zeilen ignorieren
|
||||
rawTable = data.filter(row =>
|
||||
Object.values(row).some(
|
||||
val => val !== null && val !== undefined && String(val).trim() !== ""
|
||||
)
|
||||
);
|
||||
|
||||
if (rawTable.length === 0) {
|
||||
alert("Keine gültigen Daten gefunden.");
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.getElementById("import-table");
|
||||
const headers = Object.keys(rawTable[0]);
|
||||
const rows = rawTable.map(row => headers.map(header => row[header]));
|
||||
WorkbenchExcelPreview.render("import-table", headers, rows);
|
||||
};
|
||||
|
||||
const container = document.getElementById("import-table");
|
||||
new Handsontable(container, {
|
||||
data,
|
||||
colHeaders: Object.keys(data[0]),
|
||||
rowHeaders: true,
|
||||
width: '100%',
|
||||
height: 300,
|
||||
licenseKey: 'non-commercial-and-evaluation'
|
||||
});
|
||||
};
|
||||
reader.readAsBinaryString(fileInput.files[0]);
|
||||
}
|
||||
}
|
||||
|
||||
function sendExcelData() {
|
||||
const stationNumber = sessionStorage.getItem("stationNumber") || "TEST";
|
||||
|
||||
Reference in New Issue
Block a user