1
|
<!doctype html>
|
2
|
<html ng-app="pvpk" class="no-js" lang="cs">
|
3
|
<head>
|
4
|
<meta charset="utf-8">
|
5
|
<title>Průjezd vozidel - Plzeňský kraj</title>
|
6
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
7
|
|
8
|
<meta name="description" content="Zobrazení dat o průjezdu vozidel pro Plzeňský kraj">
|
9
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
10
|
|
11
|
<link rel="apple-touch-icon" href="./assets/img/favicon.png">
|
12
|
<link rel="icon" href="./assets/img/favicon.png">
|
13
|
|
14
|
<script>
|
15
|
document.documentElement.className = document.documentElement.className.replace("no-js", "js");
|
16
|
</script>
|
17
|
|
18
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"
|
19
|
integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
|
20
|
<link rel="stylesheet" media="screen" href="./assets/css/main.css">
|
21
|
|
22
|
|
23
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
|
24
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.min.js"></script>
|
25
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-resource.min.js"></script>
|
26
|
|
27
|
<script>
|
28
|
<?php
|
29
|
/* JEN PRO TESTOVANI, POZDEJI SE ODSTRANIT, A NAHRADIT NASDILENOU KNIHOVNOU */
|
30
|
$base_url = './../backend/public/api/v1';
|
31
|
|
32
|
include_once '../backend/lib/generateToken.php';
|
33
|
$token = generateToken();
|
34
|
?>
|
35
|
var API_URL = '<?=$base_url ?>';
|
36
|
var API_TOKEN = '<?=$token ?>';
|
37
|
</script>
|
38
|
|
39
|
<script src="./app.js"></script>
|
40
|
|
41
|
|
42
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>
|
43
|
</head>
|
44
|
<body ng-controller="mainController" class="container-fluid">
|
45
|
|
46
|
|
47
|
<div id="loadingScreen" ng-show="showLoadingScreen">
|
48
|
<div class="loading"></div>
|
49
|
</div>
|
50
|
<div class="row h-100">
|
51
|
|
52
|
<!--SEARCH section-->
|
53
|
<section class="search col-12 col-sm-6 col-lg-3" id="search" ng-controller="searchController"
|
54
|
ng-class="{ 'col-sm-12': $root.selectDevice==null, 'col-sm-6': $root.selectDevice!=null }">
|
55
|
|
56
|
<div class="w-100 searchWrapper">
|
57
|
<header class="mt-2">
|
58
|
<h1>
|
59
|
<img src="./assets/img/favicon.png" alt="logo"> Průjezd vozidel
|
60
|
<small class="text-muted">Plzeňský kraj</small>
|
61
|
</h1>
|
62
|
</header>
|
63
|
|
64
|
<form class="mb-4 mt-4">
|
65
|
<div class="form-group">
|
66
|
<label for="searchLocation" class="h5">Hledání - lokalit</label>
|
67
|
<input type="search" id="searchLocation" name="location"
|
68
|
class="form-control form-control-sm" placeholder="Město, ulice, ..."
|
69
|
ng-model="search.location" required maxlength="255" autocomplete="off"
|
70
|
ng-change="searchLocations(true)">
|
71
|
</div>
|
72
|
|
73
|
<div class="custom-control custom-checkbox mb-3">
|
74
|
<!-- ng-true-value="ofCourse" ng-false-value="iWish" -->
|
75
|
<input type="checkbox" id="searchDirection" name="searchDirection" class="custom-control-input"
|
76
|
checked ng-model="search.direction" required ng-change="searchLocations()">
|
77
|
<label for="searchDirection" class="custom-control-label">Rozlišovat směr</label>
|
78
|
</div>
|
79
|
|
80
|
<div class="form-row">
|
81
|
<div class="form-group col">
|
82
|
<label for="searchFromDate">Období</label>
|
83
|
<input type="date" id="searchFromDate" name="fromDate"
|
84
|
class="form-control form-control-sm" ng-model="search.fromDate" required
|
85
|
ng-class="{ 'is-invalid': search.fromDate>search.toDate}"
|
86
|
max="{{maxDate | date:'yyyy-MM-dd'}}">
|
87
|
<div class="invalid-feedback">
|
88
|
Tento datum musí být menší.
|
89
|
</div>
|
90
|
</div>
|
91
|
|
92
|
<div class="form-group col">
|
93
|
<label for="searchToDate" class="invisible">Období</label>
|
94
|
<input type="date" id="searchToDate" name="toDateTime"
|
95
|
class="form-control form-control-sm" ng-model="search.toDate" required
|
96
|
ng-class="{ 'is-invalid': search.fromDate>search.toDate}"
|
97
|
max="{{maxDate | date:'yyyy-MM-dd'}}">
|
98
|
<div class="invalid-feedback">
|
99
|
Tento datum musí být vetší.
|
100
|
</div>
|
101
|
</div>
|
102
|
</div>
|
103
|
|
104
|
<div class="form-row">
|
105
|
<div class="form-group col">
|
106
|
<label for="searchFromTime">Časové rozmezí dne</label>
|
107
|
<input type="time" id="searchFromTime" class="form-control form-control-sm"
|
108
|
ng-model="search.fromTime" required
|
109
|
ng-class="{'is-invalid': search.fromTime>search.toTime}">
|
110
|
<div class="invalid-feedback">
|
111
|
Tento čas musí být menší.
|
112
|
</div>
|
113
|
</div>
|
114
|
|
115
|
<div class="form-group col">
|
116
|
<label for="searchToTime" class="invisible">Časové rozmezí dne</label>
|
117
|
<input type="time" id="searchToTime" class="form-control form-control-sm"
|
118
|
ng-model="search.toTime" required
|
119
|
ng-class="{'is-invalid': search.fromTime>search.toTime}">
|
120
|
<div class="invalid-feedback">
|
121
|
Tento čas musí být vetší.
|
122
|
</div>
|
123
|
</div>
|
124
|
</div>
|
125
|
</form>
|
126
|
|
127
|
|
128
|
<div class="result-locations mb-5 mt-5">
|
129
|
<h5>Lokality</h5>
|
130
|
|
131
|
<div class="list-group" ng-show="locations.length>0 && !showSearchLoading">
|
132
|
<!-- class = active -->
|
133
|
<a href="" id="location-{{location.id}}"
|
134
|
class="list-group-item list-group-item-action flex-column align-items-start"
|
135
|
ng-repeat="location in locations"
|
136
|
ng-click="selectDevice(location.id)"
|
137
|
ng-class="{'active': $root.selectDevice.id == location.id}">
|
138
|
|
139
|
<div class="d-flex w-100 justify-content-between">
|
140
|
<h6 class="mb-1">{{location.name}}</h6>
|
141
|
<small ng-show="search.direction">{{location.direction ==1 ? 'po směru': 'proti směru' }}
|
142
|
</small>
|
143
|
</div>
|
144
|
<small>
|
145
|
<address>{{location.street}}, {{location.town}}</address>
|
146
|
</small>
|
147
|
</a>
|
148
|
</div>
|
149
|
|
150
|
<div ng-show="locations.length==0 && !showSearchLoading">
|
151
|
<small class="form-text text-muted text-center">Žádná lokalita</small>
|
152
|
</div>
|
153
|
|
154
|
<div class="loading" ng-show="showSearchLoading"></div>
|
155
|
|
156
|
</div>
|
157
|
|
158
|
</div>
|
159
|
<footer class="text-center mb-2 mt-2 w-100">
|
160
|
<small class="text-muted">2018 © FAV, ZČU</small>
|
161
|
</footer>
|
162
|
</section>
|
163
|
|
164
|
|
165
|
<!--INFO section-->
|
166
|
<section class="info col-12 col-sm-6 col-lg-3" id="info" ng-show="$root.selectDevice!=null"
|
167
|
ng-controller="infoController">
|
168
|
|
169
|
<header class="mt-2">
|
170
|
|
171
|
<h5>{{$root.selectDevice.name}}
|
172
|
<button type="button" class="close" aria-label="Close" ng-click="infoClose()">
|
173
|
<span aria-hidden="true">×</span>
|
174
|
</button>
|
175
|
</h5>
|
176
|
<small>
|
177
|
<address>{{$root.selectDevice.street}}, {{$root.selectDevice.town}}</address>
|
178
|
</small>
|
179
|
</header>
|
180
|
|
181
|
<div class="loading" ng-show="showInfoLoading"></div>
|
182
|
|
183
|
|
184
|
<h3 class="mt-5">Graf #1</h3>
|
185
|
|
186
|
<h3 class="mt-5">Graf #2</h3>
|
187
|
<div class="form-group">
|
188
|
<label for="searchVehicle">Vozidla</label>
|
189
|
<select id="searchVehicle" class="custom-select custom-select-sm" ng-model="search.vehicle">
|
190
|
<option value="">Všechna vozidla</option>
|
191
|
<option ng-repeat="vehicle in vehicles" value="{{vehicle.id}}">{{vehicle.name}}</option>
|
192
|
</select>
|
193
|
</div>
|
194
|
|
195
|
<h3 class="mt-5">Graf #3</h3>
|
196
|
|
197
|
|
198
|
</section>
|
199
|
|
200
|
<!--MAP section-->
|
201
|
<section class="map col-12 col-sm-12" id="map"
|
202
|
ng-class="{ 'col-lg-9': $root.selectDevice==null, 'col-lg-6': $root.selectDevice!=null }"
|
203
|
ng-controller="mapController">
|
204
|
|
205
|
|
206
|
</section>
|
207
|
|
208
|
|
209
|
</div>
|
210
|
|
211
|
<div class="modal fade" id="modalExpiredToken" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
212
|
aria-hidden="true">
|
213
|
<div class="modal-dialog" role="document">
|
214
|
<div class="modal-content">
|
215
|
<div class="modal-header">
|
216
|
<h5 class="modal-title" id="exampleModalLabel">Platnost webové aplikace vypršela</h5>
|
217
|
</div>
|
218
|
<div class="modal-body">
|
219
|
<p>Pro obnovení platnosti stačí stisknout tlačítko <strong>Obnovit</strong>.</p>
|
220
|
</div>
|
221
|
<div class="modal-footer">
|
222
|
<button type="button" class="btn btn-primary" ng-click="reloadApp()">Obnovit</button>
|
223
|
</div>
|
224
|
</div>
|
225
|
</div>
|
226
|
</div>
|
227
|
|
228
|
|
229
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
|
230
|
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
|
231
|
crossorigin="anonymous"></script>
|
232
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"
|
233
|
integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm"
|
234
|
crossorigin="anonymous"></script>
|
235
|
|
236
|
<!--async defer-->
|
237
|
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCSx7hyAzQiG5uocJTeZgf1Z3lpDy4kpEk"
|
238
|
type="text/javascript"></script>
|
239
|
|
240
|
<script type="text/javascript" src="./assets/libs/gmaps.min.js"></script>
|
241
|
|
242
|
|
243
|
</body>
|
244
|
</html>
|