1 |
0b27c108
|
Jan Kohlíček
|
<!doctype html>
|
2 |
e4f78eb8
|
Jan Kohlíček
|
<html ng-app="pvpk" lang="cs">
|
3 |
0b27c108
|
Jan Kohlíček
|
<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 |
e4f78eb8
|
Jan Kohlíček
|
<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 |
0b27c108
|
Jan Kohlíček
|
<link rel="stylesheet" media="screen" href="./assets/css/main.css">
|
17 |
|
|
|
18 |
|
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
|
19 |
|
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.min.js"></script>
|
20 |
|
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-resource.min.js"></script>
|
21 |
e4f78eb8
|
Jan Kohlíček
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-sanitize.min.js"></script>
|
22 |
|
|
|
23 |
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>
|
24 |
0b27c108
|
Jan Kohlíček
|
|
25 |
|
|
<script>
|
26 |
|
|
<?php
|
27 |
|
|
/* JEN PRO TESTOVANI, POZDEJI SE ODSTRANIT, A NAHRADIT NASDILENOU KNIHOVNOU */
|
28 |
d68f7bbd
|
Jan Kohlíček
|
$base_url = './../backend/public/api/v1';
|
29 |
0b27c108
|
Jan Kohlíček
|
|
30 |
|
|
include_once '../backend/lib/generateToken.php';
|
31 |
|
|
$token = generateToken();
|
32 |
|
|
?>
|
33 |
|
|
var API_URL = '<?=$base_url ?>';
|
34 |
|
|
var API_TOKEN = '<?=$token ?>';
|
35 |
|
|
</script>
|
36 |
|
|
|
37 |
|
|
<script src="./app.js"></script>
|
38 |
|
|
</head>
|
39 |
|
|
<body ng-controller="mainController" class="container-fluid">
|
40 |
|
|
|
41 |
|
|
|
42 |
e4f78eb8
|
Jan Kohlíček
|
|
43 |
|
|
|
44 |
0b27c108
|
Jan Kohlíček
|
<div id="loadingScreen" ng-show="showLoadingScreen">
|
45 |
e4f78eb8
|
Jan Kohlíček
|
<h1 id="logo">
|
46 |
|
|
<img src="./assets/img/favicon.png" alt="logo"> Průjezd vozidel
|
47 |
|
|
<small class="text-muted">Plzeňský kraj</small>
|
48 |
|
|
</h1>
|
49 |
0b27c108
|
Jan Kohlíček
|
<div class="loading"></div>
|
50 |
e4f78eb8
|
Jan Kohlíček
|
<noscript id="pvpk_noscript">Aplikace vyžaduje Javascript. Aktivujte Javascript a znovu načtěte tuto stránku.</noscript>
|
51 |
0b27c108
|
Jan Kohlíček
|
</div>
|
52 |
e4f78eb8
|
Jan Kohlíček
|
|
53 |
0b27c108
|
Jan Kohlíček
|
<div class="row h-100">
|
54 |
|
|
|
55 |
d68f7bbd
|
Jan Kohlíček
|
<!--SEARCH section-->
|
56 |
|
|
<section class="search col-12 col-sm-6 col-lg-3" id="search" ng-controller="searchController"
|
57 |
|
|
ng-class="{ 'col-sm-12': $root.selectDevice==null, 'col-sm-6': $root.selectDevice!=null }">
|
58 |
0b27c108
|
Jan Kohlíček
|
|
59 |
|
|
<div class="w-100 searchWrapper">
|
60 |
|
|
<header class="mt-2">
|
61 |
|
|
<h1>
|
62 |
|
|
<img src="./assets/img/favicon.png" alt="logo"> Průjezd vozidel
|
63 |
|
|
<small class="text-muted">Plzeňský kraj</small>
|
64 |
|
|
</h1>
|
65 |
|
|
</header>
|
66 |
|
|
|
67 |
|
|
<form class="mb-4 mt-4">
|
68 |
|
|
<div class="form-group">
|
69 |
|
|
<label for="searchLocation" class="h5">Hledání - lokalit</label>
|
70 |
|
|
<input type="search" id="searchLocation" name="location"
|
71 |
|
|
class="form-control form-control-sm" placeholder="Město, ulice, ..."
|
72 |
|
|
ng-model="search.location" required maxlength="255" autocomplete="off"
|
73 |
d68f7bbd
|
Jan Kohlíček
|
ng-change="searchLocations(true)">
|
74 |
0b27c108
|
Jan Kohlíček
|
</div>
|
75 |
|
|
|
76 |
|
|
<div class="custom-control custom-checkbox mb-3">
|
77 |
|
|
<input type="checkbox" id="searchDirection" name="searchDirection" class="custom-control-input"
|
78 |
|
|
checked ng-model="search.direction" required ng-change="searchLocations()">
|
79 |
|
|
<label for="searchDirection" class="custom-control-label">Rozlišovat směr</label>
|
80 |
|
|
</div>
|
81 |
|
|
|
82 |
|
|
<div class="form-row">
|
83 |
|
|
<div class="form-group col">
|
84 |
|
|
<label for="searchFromDate">Období</label>
|
85 |
|
|
<input type="date" id="searchFromDate" name="fromDate"
|
86 |
|
|
class="form-control form-control-sm" ng-model="search.fromDate" required
|
87 |
d68f7bbd
|
Jan Kohlíček
|
ng-class="{ 'is-invalid': search.fromDate>search.toDate}"
|
88 |
|
|
max="{{maxDate | date:'yyyy-MM-dd'}}">
|
89 |
0b27c108
|
Jan Kohlíček
|
<div class="invalid-feedback">
|
90 |
|
|
Tento datum musí být menší.
|
91 |
|
|
</div>
|
92 |
|
|
</div>
|
93 |
|
|
|
94 |
|
|
<div class="form-group col">
|
95 |
|
|
<label for="searchToDate" class="invisible">Období</label>
|
96 |
|
|
<input type="date" id="searchToDate" name="toDateTime"
|
97 |
|
|
class="form-control form-control-sm" ng-model="search.toDate" required
|
98 |
d68f7bbd
|
Jan Kohlíček
|
ng-class="{ 'is-invalid': search.fromDate>search.toDate}"
|
99 |
|
|
max="{{maxDate | date:'yyyy-MM-dd'}}">
|
100 |
0b27c108
|
Jan Kohlíček
|
<div class="invalid-feedback">
|
101 |
|
|
Tento datum musí být vetší.
|
102 |
|
|
</div>
|
103 |
|
|
</div>
|
104 |
|
|
</div>
|
105 |
|
|
|
106 |
|
|
<div class="form-row">
|
107 |
|
|
<div class="form-group col">
|
108 |
|
|
<label for="searchFromTime">Časové rozmezí dne</label>
|
109 |
|
|
<input type="time" id="searchFromTime" class="form-control form-control-sm"
|
110 |
|
|
ng-model="search.fromTime" required
|
111 |
|
|
ng-class="{'is-invalid': search.fromTime>search.toTime}">
|
112 |
|
|
<div class="invalid-feedback">
|
113 |
|
|
Tento čas musí být menší.
|
114 |
|
|
</div>
|
115 |
|
|
</div>
|
116 |
|
|
|
117 |
|
|
<div class="form-group col">
|
118 |
|
|
<label for="searchToTime" class="invisible">Časové rozmezí dne</label>
|
119 |
|
|
<input type="time" id="searchToTime" class="form-control form-control-sm"
|
120 |
|
|
ng-model="search.toTime" required
|
121 |
|
|
ng-class="{'is-invalid': search.fromTime>search.toTime}">
|
122 |
|
|
<div class="invalid-feedback">
|
123 |
|
|
Tento čas musí být vetší.
|
124 |
|
|
</div>
|
125 |
|
|
</div>
|
126 |
|
|
</div>
|
127 |
|
|
</form>
|
128 |
|
|
|
129 |
|
|
<div class="result-locations mb-5 mt-5">
|
130 |
|
|
<h5>Lokality</h5>
|
131 |
|
|
|
132 |
d68f7bbd
|
Jan Kohlíček
|
<div class="list-group" ng-show="locations.length>0 && !showSearchLoading">
|
133 |
0b27c108
|
Jan Kohlíček
|
<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 |
d68f7bbd
|
Jan Kohlíček
|
ng-class="{'active': $root.selectDevice.id == location.id}">
|
138 |
0b27c108
|
Jan Kohlíček
|
|
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 |
d68f7bbd
|
Jan Kohlíček
|
<div ng-show="locations.length==0 && !showSearchLoading">
|
151 |
0b27c108
|
Jan Kohlíček
|
<small class="form-text text-muted text-center">Žádná lokalita</small>
|
152 |
|
|
</div>
|
153 |
|
|
|
154 |
d68f7bbd
|
Jan Kohlíček
|
<div class="loading" ng-show="showSearchLoading"></div>
|
155 |
0b27c108
|
Jan Kohlíček
|
</div>
|
156 |
|
|
</div>
|
157 |
|
|
<footer class="text-center mb-2 mt-2 w-100">
|
158 |
|
|
<small class="text-muted">2018 © FAV, ZČU</small>
|
159 |
|
|
</footer>
|
160 |
|
|
</section>
|
161 |
|
|
|
162 |
|
|
|
163 |
d68f7bbd
|
Jan Kohlíček
|
<!--INFO section-->
|
164 |
|
|
<section class="info col-12 col-sm-6 col-lg-3" id="info" ng-show="$root.selectDevice!=null"
|
165 |
|
|
ng-controller="infoController">
|
166 |
0b27c108
|
Jan Kohlíček
|
|
167 |
|
|
<header class="mt-2">
|
168 |
d68f7bbd
|
Jan Kohlíček
|
<h5>{{$root.selectDevice.name}}
|
169 |
|
|
<button type="button" class="close" aria-label="Close" ng-click="infoClose()">
|
170 |
0b27c108
|
Jan Kohlíček
|
<span aria-hidden="true">×</span>
|
171 |
|
|
</button>
|
172 |
d68f7bbd
|
Jan Kohlíček
|
</h5>
|
173 |
|
|
<small>
|
174 |
|
|
<address>{{$root.selectDevice.street}}, {{$root.selectDevice.town}}</address>
|
175 |
|
|
</small>
|
176 |
0b27c108
|
Jan Kohlíček
|
</header>
|
177 |
|
|
|
178 |
d68f7bbd
|
Jan Kohlíček
|
<div class="loading" ng-show="showInfoLoading"></div>
|
179 |
0b27c108
|
Jan Kohlíček
|
|
180 |
d68f7bbd
|
Jan Kohlíček
|
<h3 class="mt-5">Graf #1</h3>
|
181 |
|
|
|
182 |
|
|
<h3 class="mt-5">Graf #2</h3>
|
183 |
|
|
<div class="form-group">
|
184 |
|
|
<label for="searchVehicle">Vozidla</label>
|
185 |
|
|
<select id="searchVehicle" class="custom-select custom-select-sm" ng-model="search.vehicle">
|
186 |
|
|
<option value="">Všechna vozidla</option>
|
187 |
|
|
<option ng-repeat="vehicle in vehicles" value="{{vehicle.id}}">{{vehicle.name}}</option>
|
188 |
|
|
</select>
|
189 |
|
|
</div>
|
190 |
0b27c108
|
Jan Kohlíček
|
|
191 |
d68f7bbd
|
Jan Kohlíček
|
<h3 class="mt-5">Graf #3</h3>
|
192 |
0b27c108
|
Jan Kohlíček
|
|
193 |
d68f7bbd
|
Jan Kohlíček
|
</section>
|
194 |
|
|
|
195 |
e4f78eb8
|
Jan Kohlíček
|
|
196 |
d68f7bbd
|
Jan Kohlíček
|
<!--MAP section-->
|
197 |
0b27c108
|
Jan Kohlíček
|
<section class="map col-12 col-sm-12" id="map"
|
198 |
d68f7bbd
|
Jan Kohlíček
|
ng-class="{ 'col-lg-9': $root.selectDevice==null, 'col-lg-6': $root.selectDevice!=null }"
|
199 |
|
|
ng-controller="mapController">
|
200 |
0b27c108
|
Jan Kohlíček
|
</section>
|
201 |
|
|
</div>
|
202 |
|
|
|
203 |
e4f78eb8
|
Jan Kohlíček
|
<div class="modal fade" id="modalError" tabindex="-1" role="dialog">
|
204 |
0b27c108
|
Jan Kohlíček
|
<div class="modal-dialog" role="document">
|
205 |
|
|
<div class="modal-content">
|
206 |
|
|
<div class="modal-header">
|
207 |
e4f78eb8
|
Jan Kohlíček
|
<h5 class="modal-title" id="exampleModalLabel">{{modalError.title}}</h5>
|
208 |
0b27c108
|
Jan Kohlíček
|
</div>
|
209 |
|
|
<div class="modal-body">
|
210 |
e4f78eb8
|
Jan Kohlíček
|
<p ng-bind-html="modalError.body"></p>
|
211 |
0b27c108
|
Jan Kohlíček
|
</div>
|
212 |
|
|
<div class="modal-footer">
|
213 |
e4f78eb8
|
Jan Kohlíček
|
<button type="button" class="btn btn-primary" data-dismiss="{{modalError.clickButton ? '' : 'modal'}}"
|
214 |
|
|
ng-click="modalError.clickButton && modalError.clickButton()">{{modalError.button}}
|
215 |
|
|
</button>
|
216 |
0b27c108
|
Jan Kohlíček
|
</div>
|
217 |
|
|
</div>
|
218 |
|
|
</div>
|
219 |
|
|
</div>
|
220 |
|
|
|
221 |
|
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
|
222 |
|
|
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
|
223 |
|
|
crossorigin="anonymous"></script>
|
224 |
e4f78eb8
|
Jan Kohlíček
|
|
225 |
|
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"
|
226 |
|
|
integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T"
|
227 |
0b27c108
|
Jan Kohlíček
|
crossorigin="anonymous"></script>
|
228 |
|
|
|
229 |
d68f7bbd
|
Jan Kohlíček
|
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCSx7hyAzQiG5uocJTeZgf1Z3lpDy4kpEk"
|
230 |
|
|
type="text/javascript"></script>
|
231 |
|
|
|
232 |
|
|
<script type="text/javascript" src="./assets/libs/gmaps.min.js"></script>
|
233 |
|
|
|
234 |
0b27c108
|
Jan Kohlíček
|
</body>
|
235 |
|
|
</html>
|