From 0b207d93c6adaf15adfcb890a4a40abb1be1cb2c Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <jkowalsk@student.agh.edu.pl> Date: Sun, 29 Oct 2017 17:41:28 +0000 Subject: [PATCH] Merge pull request #11 from p0358/master --- index.js | 6 ++++-- common.js | 1 - index.html | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common.js b/common.js index 64f0167..e63a371 100644 --- a/common.js +++ b/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; diff --git a/index.html b/index.html index f4e3a0e..65b6577 100644 --- a/index.html +++ b/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> diff --git a/index.js b/index.js index fc4a34d..c21eff0 100644 --- a/index.js +++ b/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'; -- Gitblit v1.9.1