Use navbar for loading indication
| | |
| | | font-weight: normal; |
| | | font-size: inherit; |
| | | } |
| | | |
| | | nav.loading { |
| | | background-image: -webkit-linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 50%,rgba(0,0,0,.1) 50%,rgba(0,0,0,.1) 75%,transparent 75%,transparent); |
| | | background-image: -o-linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 50%,rgba(0,0,0,.1) 50%,rgba(0,0,0,.1) 75%,transparent 75%,transparent); |
| | | background-image: linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 25%,transparent 50%,rgba(0,0,0,.1) 50%,rgba(0,0,0,.1) 75%,transparent 75%,transparent); |
| | | -webkit-background-size: 40px 40px; |
| | | background-size: 40px 40px; |
| | | -webkit-animation: progress-bar-stripes 2s linear infinite; |
| | | -o-animation: progress-bar-stripes 2s linear infinite; |
| | | animation: progress-bar-stripes 2s linear infinite; |
| | | } |
| | | nav.loading * { |
| | | color: black !important; |
| | | } |
| | |
| | | </div> |
| | | </nav> |
| | | <div class="container-fluid"> |
| | | <div id="progress" class="progress" style="display: none;"> |
| | | <div id="progress-bar" class="progress-bar progress-bar-striped active" style="width: 100%"> |
| | | <span id="progress-text" class="sr-only">Refreshing data...</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="alert" class="alert alert-danger alert-dismissible" style="display:none"> |
| | | <a href="#" class="close" id="alert-close" aria-label="close">×</a> |
| | | <strong>Error occured!</strong> <span id="alert-text"></span> |
| | |
| | | var alert_text = document.getElementById('alert-text'); |
| | | var alert_close = document.getElementById('alert-close'); |
| | | |
| | | var progress = document.getElementById('progress'); |
| | | var nav = document.getElementsByTagName('nav')[0]; |
| | | |
| | | var parseStatusBoarding = '>>>'; |
| | | function parseStatus(status) { |
| | |
| | | } |
| | | |
| | | function loading_start() { |
| | | progress.style.display = 'block'; |
| | | nav.className += ' loading'; |
| | | } |
| | | |
| | | function loading_end() { |
| | | progress.style.display = 'none'; |
| | | nav.className = nav.className.replace(' loading', ''); |
| | | } |
| | | |
| | | function loadTimes(stopId = null, clearRoute = false) { |