Improved www.ttss.krakow.pl
Jacek Kowalski
2019-04-14 448c31f9d1b2e0a399f2d42b06cfe7a36d1e16c3
Add stop type to the header in timetables
3 files modified
9 ■■■■ changed files
index.css 3 ●●●●● patch | view | raw | blame | history
index.html 4 ●●●● patch | view | raw | blame | history
index.js 2 ●●●●● patch | view | raw | blame | history
index.css
@@ -34,6 +34,9 @@
    font-size: inherit;
}
h2#times-stop {
    margin-top: 0;
}
.vehicleInfo {
    font-size: 21px;
}
index.html
@@ -56,7 +56,7 @@
            
            <div class="row">
                <div class="col-md-6">
                    <h2 id="times-stop-name"></h2>
                    <h2 id="times-stop"><small id="times-stop-type"></small><br /><span id="times-stop-name"></span></h2>
                    
                    <div id="times-alerts"></div>
                    
@@ -136,6 +136,6 @@
        <script src="https://polyfill.io/v3/polyfill.min.js?features=Promise,XMLHttpRequest"></script>
        <script type="text/javascript" src="lang_pl.js?v7" id="lang_script"></script>
        <script type="text/javascript" src="common.js?v8"></script>
        <script type="text/javascript" src="index.js?v6"></script>
        <script type="text/javascript" src="index.js?v7"></script>
    </body>
</html>
index.js
@@ -17,6 +17,7 @@
var times_xhr;
var times_timer;
var times_stop_type = document.getElementById('times-stop-type');
var times_stop_name = document.getElementById('times-stop-name');
var times_alerts = document.getElementById('times-alerts');
var times_table = document.getElementById('times-table');
@@ -103,6 +104,7 @@
            + '?stop=' + encodeURIComponent(stop)
            + '&mode=departure'
    ).done(function(data) {
        setText(times_stop_type, lang.types['s' + prefix]);
        setText(times_stop_name, data.stopName);
        setText(page_title, lang.page_title_stop_name.replace('$stop', data.stopName));
        deleteChildren(times_alerts);