Improved www.ttss.krakow.pl
Jacek Kowalski
2017-10-29 0b207d93c6adaf15adfcb890a4a40abb1be1cb2c
Merge pull request #11 from p0358/master

Show times on tram loops/first stops
3 files modified
11 ■■■■ changed files
common.js 1 ●●●● patch | view | raw | blame | history
index.html 4 ●●●● patch | view | raw | blame | history
index.js 6 ●●●●● patch | view | raw | blame | history
common.js
@@ -35,7 +35,6 @@
function parseStatus(status) {
    switch(status.status) {
        case 'STOPPING':
            return lang.boarding_sign;
        case 'PREDICTED':
            if(status.actualRelativeTime <= 0)
                return lang.boarding_sign;
index.html
@@ -134,8 +134,8 @@
            </div>
        </div>
        <script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7"  crossorigin="anonymous"></script>
        <script tyle="text/javascript" src="lang_pl.js" id="lang_script"></script>
        <script tyle="text/javascript" src="common.js"></script>
        <script type="text/javascript" src="lang_pl.js" id="lang_script"></script>
        <script type="text/javascript" src="common.js"></script>
        <script type="text/javascript" src="index.js"></script>
    </body>
</html>
index.js
@@ -137,9 +137,11 @@
            var delay = parseDelay(data.actual[i]);
            var delay_cell = addCellWithText(tr, delay);
            
            if(status == lang.boarding_sign) {
            if(data.actual[i].status == 'STOPPING') {
                tr.className = 'success';
                status_cell.className = 'status-boarding';
                if (data.actual[i].actualRelativeTime <= 0) {
                    status_cell.className = 'status-boarding';
                }
            } else if(parseInt(delay) > 9) {
                tr.className = 'danger';
                delay_cell.className = 'status-delayed';