Skip to content

Commit 33e0bd2

Browse files
added target icon for followed vehicle
1 parent ac78a77 commit 33e0bd2

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

cache.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# version 214
2+
# version 216
33

44
# gogole maps files
55
http://maps.google.com/maps/api/js?v=3.10&sensor=false&language=en_us&key=AIzaSyCOqkcNey4CCyG4X0X5qxHAhCgD8g5DwXg

css/main.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,13 @@ header > div {
264264
width: 100%;
265265
border-left: 5px solid #F4F4F4;
266266
}
267+
268+
#main .row .icon-target:before {
269+
display: none;
270+
}
271+
#main .row.follow .icon-target:before {
272+
display: inline-block;
273+
}
267274
#main .row.active .data { display: inline-block; }
268275
#main .row .data .left,
269276
#main .row .data .right {

js/app.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ $(window).ready(function() {
282282
$('#main').on('click', '.row .data', function() {
283283
var e = $(this).parent();
284284
followVehicle(parseInt(e.attr('class').match(/vehicle(\d+)/)[1]));
285+
$('#main .row.follow').removeClass('follow');
286+
e.addClass('follow');
285287
});
286288

287289
// expand/collapse data when header is clicked
@@ -297,6 +299,7 @@ $(window).ready(function() {
297299
// disable following only we are collapsing the followed vehicle
298300
if(follow_vehicle == parseInt(e.attr('class').match(/vehicle(\d+)/)[1])) {
299301
stopFollow();
302+
e.removeClass('follow');
300303
}
301304
} else {
302305
// expand data for selected vehicle
@@ -313,6 +316,8 @@ $(window).ready(function() {
313316

314317
// pan to selected vehicle
315318
followVehicle(parseInt(e.attr('class').match(/vehicle(\d+)/)[1]));
319+
$('#main .row.follow').removeClass('follow');
320+
e.addClass('follow');
316321
}
317322
});
318323

js/tracker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ function updateVehicleInfo(index, position) {
377377

378378
// start
379379
var a = '<div class="header">'
380-
+ '<span>' + vehicle_names[index] + '</span>'
380+
+ '<span>' + vehicle_names[index] + ' <i class="icon-target"></i></span>'
381381
+ '<img class="graph" src="img/blank.png">'
382382
+ '<i class="arrow"></i></div>'
383383
+ '<div class="data">'

0 commit comments

Comments
 (0)