Commit cc30df60 authored by Clouard Regis's avatar Clouard Regis
Browse files

Changed Number control points in preview from 0.

parent 06b57b12
......@@ -69,7 +69,7 @@ function previewXml(data, divXml) {
indexColumnHead.innerHTML = "Numéro";
let nameColumnHead = document.createElement("th");
nameColumnHead.setAttribute("scope", "col");
nameColumnHead.innerHTML = "Nom";
nameColumnHead.innerHTML = "Label";
let typeColumnHead = document.createElement("th");
typeColumnHead.setAttribute("scope", "col");
typeColumnHead.innerHTML = "Type";
......@@ -79,14 +79,21 @@ function previewXml(data, divXml) {
rowHead.appendChild(typeColumnHead);
tableHead.appendChild(rowHead);
tableSection.appendChild(tableHead);
let tableBody = document.createElement("tbody");
tableSection.appendChild(tableBody);
const total = data.xml1.length;
for (let [key, value] of Object.entries(data.xml1)) {
let row = document.createElement("tr");
let indexCell = document.createElement("th");
let indexCell = document.createElement("td");
indexCell.setAttribute("scope", "row");
indexCell.innerHTML = parseInt(key, 10) + 1;
const index = parseInt(key, 10);
if (index === 0) {
indexCell.innerHTML = "Dép."
} else if (index === total - 1) {
indexCell.innerHTML = "Arr."
} else {
indexCell.innerHTML = index;
}
let nameCell = document.createElement("td");
nameCell.innerHTML = value[0];
let typeCell = document.createElement("td");
......
......@@ -6,7 +6,6 @@
<link rel="stylesheet" href="{{ asset('/public/css/tabs.css') }}"/>
<link rel="stylesheet" href="{{ asset('/public/leaflet/leaflet.css') }}"/>
<link rel="stylesheet" href="{{ asset('/public/leaflet/easy-button.css') }}"/>
{% endblock %}
{% block javascripts %}
......@@ -15,7 +14,6 @@
<script src="{{ asset('/public/leaflet/leaflet.js') }}"></script>
<script src="{{ asset('/public/leaflet/ImageOverlay.rotated.js') }}"></script>
<script src="{{ asset('/public/leaflet/easy-button.js') }}"></script>
<script>
window.addEventListener("load", function (event) {
let divLeaflet = document.createElement("div");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment