Skip to content

Commit ed73d5b

Browse files
fix projecthorus#83; added SSDV button
1 parent 9a2615b commit ed73d5b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

js/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,10 @@ $(window).ready(function() {
581581
}
582582
});
583583

584+
$("#main").on('tap','.row .data a.vbutton', function(event) {
585+
this.click();
586+
});
587+
584588
$("#main").on('tap','.row .data .vbutton.path', function(event) {
585589
event.stopPropagation();
586590

js/tracker.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,8 @@ function updateVehicleInfo(vcallsign, newPosition) {
966966
' style="top:'+(vehicle.image_src_size.height+55)+'px">Path</span>' +
967967
((vcallsign in hysplit) ? '<span class="vbutton hysplit '+((hysplit[vcallsign].getMap()) ? 'active' : '')+'"' +
968968
' data-vcallsign="'+vcallsign+'" style="top:'+(vehicle.image_src_size.height+55+21+10)+'px">HYSPLIT</span>' : '') +
969+
((vcallsign.substr(0, 6) in ssdv) ? '<a class="vbutton active" href="http://ssdv.habhub.org/' + vcallsign.substr(0, 6) + '"' +
970+
' target="_blank" style="top:'+(vehicle.image_src_size.height+55+((vcallsign in hysplit) ? 42 : 21)+10)+'px">SSDV</a>' : '') +
969971
'<div class="left">' +
970972
'<dl>';
971973
// end
@@ -2696,6 +2698,7 @@ function refreshUI() {
26962698
if(follow_vehicle !== null) update_lookangles(follow_vehicle);
26972699
}
26982700

2701+
var ssdv = {};
26992702
var status = "";
27002703
var bs_idx = 0;
27012704

@@ -2713,6 +2716,8 @@ function update(response) {
27132716
return;
27142717
}
27152718

2719+
ssdv = (!response.ssdv) ? {} : response.ssdv;
2720+
27162721
// create a dummy response object for postions
27172722
var lastPositions = { positions: { position: [] } };
27182723
var ctx_init = {

0 commit comments

Comments
 (0)