Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 01189277

Přidáno uživatelem kohlicekjan před více než 6 roky(ů)

Closes #3, #4, #5, #6, #7; přidaná možnost měnit směr v sekci #info, kontrola časového rozmezí, přispůsobování popisků grafu, zobrazení špatných dat jako 0, odkazu byl přidán rel="noopener", aktualizace knihoven

Zobrazit rozdíly:

frontend/index.php
8 8
    <meta name="description" content="Zobrazení dat o průjezdu vozidel pro Plzeňský kraj">
9 9
    <meta name="viewport" content="width=device-width, initial-scale=1">
10 10

  
11
    <link rel="manifest" href="app.webmanifest">
12

  
11 13
    <link rel="apple-touch-icon" href="./assets/img/favicon.png">
12 14
    <link rel="icon" href="./assets/img/favicon.png">
13 15

  
14
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"
15
          integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
16
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
17
          integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
16 18
    <link rel="stylesheet" media="screen" href="./assets/css/styles.min.css">
17 19

  
18
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.0/angular.min.js"></script>
19
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.0/angular-resource.min.js"></script>
20
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.0/angular-sanitize.min.js"></script>
20
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular.min.js"></script>
21
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular-resource.min.js"></script>
22
    <!--    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular-sanitize.min.js"></script>-->
21 23

  
22 24
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>
23 25
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
......
42 44
<div id="loadingScreen" ng-show="showLoadingScreen">
43 45
    <h1 id="logo">
44 46
        <img src="./assets/img/favicon.png" alt="logo"> Průjezd vozidel
45
        <small class="text-muted">Plzeňský kraj</small>
47
        <small>Plzeňský kraj</small>
46 48
    </h1>
47 49
    <div class="loading"></div>
48 50
    <noscript id="noscript">Aplikace vyžaduje Javascript. Aktivujte Javascript a znovu načtěte tuto stránku.
......
58 60
            <header class="mt-2">
59 61
                <h1>
60 62
                    <img src="./assets/img/favicon.png" alt="logo"> Průjezd vozidel
61
                    <small class="text-muted">Plzeňský kraj</small>
63
                    <small>Plzeňský kraj</small>
62 64
                </h1>
63 65
            </header>
64 66

  
65
            <form class="mb-4 mt-4">
67
            <div class="mb-4 mt-4">
66 68
                <div class="form-group">
67 69
                    <label for="searchLocation" class="h5">Hledání - lokalit</label>
68 70
                    <input type="search" id="searchLocation" name="location"
......
79 81
                           ng-model-options="{debounce: 600}">
80 82
                    <label for="searchIsDirection" class="custom-control-label">Rozlišovat směr</label>
81 83
                </div>
82
            </form>
84
            </div>
83 85

  
84 86
            <div class="result-locations mb-4 mt-4">
85 87
                <h5>Lokality</h5>
......
96 98
                            <small ng-show="search.isDirection">{{location.direction ==1 ? 'po směru': 'proti směru' }}
97 99
                            </small>
98 100
                        </div>
99
                        <small>
100
                            <address>{{location.street}}, {{location.town}}</address>
101
                        </small>
101
                        <address class="small">{{location.street}}, {{location.town}}</address>
102

  
102 103
                    </a>
103 104
                </div>
104 105

  
105
                <div ng-show="locations.length==0 && !showSearchLoading">
106
                    <small class="form-text text-muted text-center">Žádná lokalita</small>
106
                <div class="form-text text-center small" ng-show="locations.length==0 && !showSearchLoading">
107
                    Žádná lokalita
107 108
                </div>
108 109

  
109 110
                <div class="loading" ng-show="showSearchLoading"></div>
110 111
            </div>
111 112
        </div>
112
        <footer class="text-center mb-2 mt-2 w-100">
113
            <small class="text-muted">© 2018 FAV, ZČU • version: {{ config.APP_VERSION }}</small>
113
        <footer class="text-center text-muted mb-2 mt-2 w-100 small">
114
            © 2018 FAV, ZČU • version: {{ config.APP_VERSION }}
114 115
        </footer>
115 116
    </section>
116 117

  
......
125 126
                    <span aria-hidden="true">&times;</span>
126 127
                </button>
127 128
            </h4>
128
            <small>
129
                <address>{{$root.selectDevice.street}}, {{$root.selectDevice.town}}</address>
130
                <span>Směr: <strong>{{$root.selectDevice.direction  ? ($root.selectDevice.direction ==1 ? 'po směru': 'proti směru') : 'po směru i proti směru'}}</strong></span>
131
            </small>
129
            <address>{{$root.selectDevice.street}}, {{$root.selectDevice.town}}</address>
132 130
        </header>
133 131

  
132
        <div class="form-inline mb-4 mt-2">
133
            <label for="selectDeviceDirection" class="=hidden"></label>
134
            <select id="selectDeviceDirection" class="custom-select custom-select-sm"
135
                    ng-model="$root.selectDevice.direction"
136
                    ng-change="changeDirection(direction.id)"
137
                    ng-options="direction.id as direction.name for direction in directions"
138
                    ng-model-options="{updateOn: 'default', allowInvalid: true, debounce: 600}">
139
            </select>
140
        </div>
141

  
142

  
143
        <div class="alert alert-warning" role="alert"
144
             ng-show="!(range.fromDate >= range.minDate && range.toDate <= range.maxDate && range.toDate >= range.minDate && range.fromDate <= range.maxDate)">
145

  
146
            Data jsou k dispozici jen v rosahu {{range.minDate | date:"dd.MM.yyyy"}} - {{range.maxDate| date:"dd.MM.yyyy"}}
147

  
148
        </div>
149

  
150

  
134 151
        <div class="mb-4 mt-4" ng-form="rangeForm">
135 152
            <div class="form-row">
136 153
                <div class="form-group col">
......
157 174
                    </div>
158 175
                </div>
159 176
            </div>
160

  
161 177
            <div class="form-row">
162 178
                <div class="form-group col">
163 179
                    <label for="rangeFromTime">
......
199 215
        <div class="loading" ng-show="showInfoLoading"></div>
200 216

  
201 217
        <div id="graphs" ng-show="$root.selectDevice!=null && $root.selectDevice.traffics.length>0 && !showInfoLoading">
202
            <h4 class="mt-4">Průměrná rychlost</h4>
218
            <h4 class="mt-4">{{range.isTime ? "Průměrná rychlost za den" : "Průměrná rychlost za jednotlivé dny"}}</h4>
203 219
            <graph-average-speed></graph-average-speed>
204 220

  
205
            <h4 class="mt-4">Počet vozidel</h4>
221
            <h4 class="mt-4">{{range.isTime ? "Počet vozidel za den" : "Průměrná rychlost za jednotlivé dny"}}</h4>
206 222
            <graph-number-vehicles></graph-number-vehicles>
207 223

  
208 224
            <div class="text-center">
209 225
                <a class="btn btn-dark" href="{{ urlExportCsv }}" role="button">Export CSV</a>
210 226
            </div>
211 227

  
212
            <div class="text-center mb-2 mt-2 w-100">
213
                <small class="text-muted">zdroj dat: <a target="_blank" href="https://doprava.plzensky-kraj.cz">doprava.plzensky-kraj.cz</a>
214
                </small>
228
            <div class="text-center mb-2 mt-2 w-100 small">
229
                zdroj dat: <a class="source-link" target="_blank" rel="noopener"
230
                              href="https://doprava.plzensky-kraj.cz">doprava.plzensky-kraj.cz</a>
231

  
215 232
            </div>
216 233
        </div>
217 234

  
218
        <div ng-show="$root.selectDevice && $root.selectDevice.traffics.length==0 && !showInfoLoading">
219
            <small class="form-text text-muted text-center">Data nejsou k dispozici</small>
235
        <div class="form-text text-center small"
236
             ng-show="$root.selectDevice && $root.selectDevice.traffics.length==0 && !showInfoLoading">
237
            Data nejsou k dispozici
220 238
        </div>
221 239
    </section>
222 240

  
......
234 252
                <h5 class="modal-title">{{modalError.title}}</h5>
235 253
            </div>
236 254
            <div class="modal-body">
237
                <p ng-bind-html="modalError.body"></p>
255
                <p>{{modalError.body}}</p>
238 256
            </div>
239 257
            <div class="modal-footer">
240 258
                <button type="button" class="btn btn-primary" data-dismiss="{{modalError.clickButton ? '' : 'modal'}}"
......
249 267
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
250 268
        crossorigin="anonymous"></script>
251 269

  
252
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"
253
        integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T"
270
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
271
        integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
254 272
        crossorigin="anonymous"></script>
255 273

  
256 274
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCSx7hyAzQiG5uocJTeZgf1Z3lpDy4kpEk"

Také k dispozici: Unified diff