Improved www.ttss.krakow.pl
Jacek Kowalski
2019-02-01 1256262428ad68f9039d208674b0db1a851f966a
Low indicator is an integer now, not string
3 files modified
16 ■■■■ changed files
common.js 6 ●●●● patch | view | raw | blame | history
map.html 4 ●●●● patch | view | raw | blame | history
map.js 6 ●●●● patch | view | raw | blame | history
common.js
@@ -122,13 +122,13 @@
    span.className = 'vehicleInfo';
    
    var floor_type = '';
    if(vehicleInfo.low == '0') {
    if(vehicleInfo.low == 0) {
        setText(span, lang.high_floor_sign);
        floor_type = lang.high_floor;
    } else if(vehicleInfo.low == '1') {
    } else if(vehicleInfo.low == 1) {
        setText(span, lang.partially_low_floor_sign);
        floor_type = lang.partially_low_floor;
    } else if(vehicleInfo.low == '2') {
    } else if(vehicleInfo.low == 2) {
        setText(span, lang.low_floor_sign);
        floor_type = lang.low_floor;
    }
map.html
@@ -17,7 +17,7 @@
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList"></script>
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v5.3.0/build/ol.js" integrity="sha384-iQkGyyH4ioz3m+maM3s9MX1Oq67mACa4B9Z3ovUv3Sv37LJ96fx3WnZfLoiC3Wfl" crossorigin="anonymous"></script>
<script tyle="text/javascript" src="lang_pl.js?v2" id="lang_script"></script>
<script tyle="text/javascript" src="common.js?v2"></script>
<script tyle="text/javascript" src="map.js?v5"></script>
<script tyle="text/javascript" src="common.js?v3"></script>
<script tyle="text/javascript" src="map.js?v6"></script>
</body>
</html>
map.js
@@ -78,11 +78,11 @@
    var color_type = 'black';
    if(vehicle.get('vehicle_type')) {
        switch(vehicle.get('vehicle_type').low) {
            case '0':
            case 0:
                color_type = 'orange';
            break;
            case '1':
            case '2':
            case 1:
            case 2:
                color_type = 'green';
            break;
        }