Add notes
This commit is contained in:
parent
d2ba491675
commit
caf4ce5611
@ -4,6 +4,8 @@ RUN npm i uglifyjs-folder uglifycss html-minifier-terser -g
|
||||
COPY . /data/in
|
||||
RUN bash /data/in/conf/deploy.sh
|
||||
|
||||
## Maybe use: georgjung/nginx-brotli:mainline-alpine
|
||||
## Instead?
|
||||
FROM fholzer/nginx-brotli:latest
|
||||
RUN rm /etc/nginx/nginx.conf
|
||||
RUN apk update && apk add --upgrade libxml2 libxslt
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
/* All Page Init */
|
||||
const version = '2023.6.1'
|
||||
const version = '2023.6.4'
|
||||
|
||||
/* Feature Detectors */
|
||||
|
||||
|
@ -78,29 +78,41 @@ async function displayOne(object) {
|
||||
for (const stop of publicStops) {
|
||||
stopRows += await createPublicStopTableRow(stop)
|
||||
}
|
||||
// If there are no public stops, show non-public locations
|
||||
if (!publicStops.length) {
|
||||
for (const stop of object['stops']) {
|
||||
stopRows += await createPublicStopTableRow(stop, 'wtt')
|
||||
}
|
||||
}
|
||||
const displayBox = document.getElementById('train_data')
|
||||
displayBox.innerHTML = ''
|
||||
displayBox.insertAdjacentHTML('beforeend', dataTableHead + stopRows + dataTableClose)
|
||||
displayBox.style = 'display:block;'
|
||||
}
|
||||
|
||||
async function createPublicStopTableRow(stop) {
|
||||
let data_tiploc = stop['tiploc'], public_arr = stop['publicArrival'],
|
||||
public_dep = stop['publicDeparture']
|
||||
async function createPublicStopTableRow(stop, type='public') {
|
||||
let arr, dep
|
||||
let data_tiploc = stop['tiploc']
|
||||
if (type === 'wtt') {
|
||||
arr = stop['wttArrival'], dep = stop['wttDeparture']
|
||||
}
|
||||
if (type === 'public') {
|
||||
arr = stop['publicArrival'], dep = stop['publicDeparture']
|
||||
}
|
||||
if (typeof data_tiploc === 'undefined') {
|
||||
data_tiploc = ''
|
||||
}
|
||||
if (typeof public_arr === 'undefined') {
|
||||
public_arr = '-'
|
||||
if (typeof arr === 'undefined') {
|
||||
arr = '-'
|
||||
}
|
||||
if (typeof public_dep === 'undefined') {
|
||||
public_dep = '-'
|
||||
if (typeof dep === 'undefined') {
|
||||
dep = '-'
|
||||
}
|
||||
return `
|
||||
<tr>
|
||||
<td id='data_tiploc'>${data_tiploc}</td>
|
||||
<td id='public_arr'>${public_arr}</td>
|
||||
<td id='public_dep'>${public_dep}</td>
|
||||
<td id='public_arr'>${arr}</td>
|
||||
<td id='public_dep'>${dep}</td>
|
||||
</tr>
|
||||
`
|
||||
}
|
2
pis.html
2
pis.html
@ -49,7 +49,7 @@
|
||||
<form action="javascript:findByHeadcode();">
|
||||
<div id="crs-inputs">
|
||||
<div class="crs-input">
|
||||
<label for="pis">PIS Code:</label><br>
|
||||
<label for="pis">Headcode:</label><br>
|
||||
<input type="text" class="small-lookup-box pis-input" id="headcode" name="headcode" maxlength="4" autocomplete="off"><br><br>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user