Add close button and airframes.org link

This commit is contained in:
James Wilson 2018-07-31 16:12:03 -05:00
parent 3298eb77b4
commit 0983766a6c
3 changed files with 40 additions and 1 deletions

View file

@ -268,6 +268,7 @@
<div id="selected_infoblock" class="hidden">
<div id="splitter-infoblock" class="ui-resizable-handle ui-resizable-n"></div>
<div id="close-button">Close</div>
<div class="infoblock-container">
<div class="highlightedTitle">
@ -621,6 +622,11 @@
<div class="bottom-container">
<span id="selected_flightaware_link" class=""></span>
<div class="selected_airframe">
<a href="http://www.airframes.org/" onclick="document.getElementById('horrible_hack').submit.call(document.getElementById('airframes_post')); return false;">
airframes.org
</a>
</div>
</div>
</div>

View file

@ -219,6 +219,19 @@ function initialize() {
minHeight: 50
});
$('#close-button').on('click', function() {
if (SelectedPlane !== null) {
var selectedPlane = Planes[SelectedPlane];
SelectedPlane = null;
selectedPlane.selected = null;
selectedPlane.clearLines();
selectedPlane.updateMarker();
refreshSelected();
refreshHighlighted();
$('#selected_infoblock').hide();
}
});
// this is a little hacky, but the best, most consitent way of doing this. change the margin bottom of the table container to the height of the overlay
$('#selected_infoblock').on('resize', function() {
$('#sidebar_canvas').css('margin-bottom', $('#selected_infoblock').height() + 'px');
@ -1540,7 +1553,7 @@ function setSelectedInfoBlockVisibility() {
else {
$('#selected_infoblock').hide();
$('#sidebar_canvas').css('margin-bottom', 0);
}
}
}
// Reposition selected plane info box if it overlaps plane marker

View file

@ -136,6 +136,20 @@ html, body {
background-image: url("images/toggle-height@2x.png");
background-size: cover;
}
#close-button {
display: inline-block;
position: absolute;
top: 5px;
color: #00A0E2;
right: 30px;
margin-left: auto;
font-size: 75%;
text-decoration: underline;
cursor: pointer;
background: #fff;
padding: 3px;
border-radius: 2px;
}
.ol-zoom-in {
background-image: url("images/zoom-in.png");
@ -698,6 +712,12 @@ select.error, textarea.error, input.error {
color: #002F5D;
line-height: 18px;
}
.selected_airframe {
padding-top: 75px;
}
.selected_airframe a {
color: #002F5D;
}
.infoblock-container-small .infoRowFluid {
display: block;