Skip to content

Commit 58f1e9b

Browse files
committed
ui 2
1 parent 34bf2b8 commit 58f1e9b

8 files changed

Lines changed: 2527 additions & 4 deletions

File tree

cachebust.list

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
images/sprites.png
2+
ui2.js
3+
ui2.css
24
dbloader.js
35
defaults.js
46
early.js

html/early.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,8 @@ Toggle.prototype.toggle = function(override, init) {
800800
}
801801
}
802802

803+
TAR && TAR.newUI && TAR.newUI.active && TAR.newUI.syncToggle(this.key, this.state);
804+
803805
if (!init)
804806
loStore[this.key] = this.state;
805807
}

html/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<link rel="stylesheet" href="libs/ol-8.2.0.css" type="text/css" />
1717
<link rel="stylesheet" href="libs/ol-layerswitcher-4.1.1.css" type="text/css"/>
1818
<link rel="stylesheet" href="style.css" type="text/css" />
19+
<link rel="stylesheet" href="ui2.css" type="text/css" />
1920

2021
<link rel="icon" type="image/png" href="images/tar1090-favicon.png">
2122

@@ -1089,6 +1090,7 @@ <h2>Improve Coverage:<br><a class="largeText" target="_blank" href="https://airp
10891090
<script src="layers.js"></script>
10901091
<script src="geomag2020.js"></script>
10911092
<script src="markers.js"></script>
1093+
<script src="ui2.js"></script>
10921094

10931095
<!-- JS_ANCHOR3 -->
10941096
<script>let spriteSrc = 'images/sprites.png';</script>

html/markers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,7 @@ function iconTest() {
14131413
jQuery('#splitter').hide();
14141414
jQuery('#tabs').hide();
14151415
jQuery('#filterButton').hide();
1416+
jQuery('.ui2-chrome').hide();
14161417
jQuery('.ol-control').hide();
14171418
jQuery('.ol-attribution').show();
14181419
jQuery("#loader").addClass("hidden");

html/script.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,8 @@ function initialize() {
773773

774774
processQueryToggles();
775775

776+
TAR.newUI && TAR.newUI.init();
777+
776778
jQuery.when(historyQueued).done(push_history);
777779

778780
if (!nHistoryItems) {
@@ -2645,6 +2647,7 @@ function ol_map_init() {
26452647
});
26462648

26472649
OLMap.on(['click', 'dblclick'], function(evt) {
2650+
if (TAR.newUI && TAR.newUI.measureActive) return;
26482651
let trailHex = null;
26492652
let trailTS = null;
26502653
let planeHex = null;
@@ -2794,6 +2797,7 @@ function showHideButtons() {
27942797
jQuery('#filterButton').hide();
27952798
jQuery('.ol-zoom').hide();
27962799
jQuery('.layer-switcher').hide();
2800+
jQuery('.ui2-chrome').hide();
27972801
} else {
27982802
jQuery('#header_top').show();
27992803
jQuery('#header_side').show();
@@ -2802,6 +2806,7 @@ function showHideButtons() {
28022806
jQuery('#filterButton').show();
28032807
jQuery('.ol-zoom').show();
28042808
jQuery('.layer-switcher').show();
2809+
jQuery('.ui2-chrome').show();
28052810
}
28062811
}
28072812

@@ -3209,6 +3214,12 @@ function initMap() {
32093214
loStore['noMLAT'] = noMLAT;
32103215
console.log('noMLAT = ' + noMLAT);
32113216
break;
3217+
case "/":
3218+
if (TAR.newUI && TAR.newUI.active) {
3219+
TAR.newUI.focusSearch();
3220+
e.preventDefault();
3221+
}
3222+
break;
32123223
}
32133224
}, true);
32143225

@@ -4968,6 +4979,7 @@ function buttonActive(id, state) {
49684979
jQuery(id).addClass('inActiveButton');
49694980
jQuery(id).removeClass('activeButton');
49704981
}
4982+
TAR.newUI && TAR.newUI.active && TAR.newUI.syncButton(id, state);
49714983
}
49724984

49734985
function toggleIsolation(state, noRefresh) {
@@ -8065,10 +8077,11 @@ function initReplay(chunk, data) {
80658077
}
80668078

80678079
function setReplayTimeHint(date) {
8080+
jQuery('#replayTimeZone').html('');
80688081
if (true || utcTimesHistoric) {
8069-
jQuery("#replayDateHintLocal").html(TIMEZONE + " Date: " + lDateString(date));
8070-
jQuery("#replayDateHint").html("" + zDateString(date));
8071-
jQuery("#replayTimeHint").html("UTC:" + NBSP + zuluTime(date) + ' / ' + TIMEZONE + ":" + NBSP + localTime(date));
8082+
jQuery("#replayDateHint").html("UTC: " + zDateString(date) + '<br/>' + TIMEZONE + ": " + lDateString(date));
8083+
//jQuery("#replayDateHintLocal").html(TIMEZONE + " Date: " + lDateString(date));
8084+
jQuery("#replayTimeHint").html("UTC:" + NBSP + zuluTime(date) + '<br/>' + TIMEZONE + ":" + NBSP + localTime(date));
80728085
} else {
80738086
jQuery("#replayDateHintLocal").html("");
80748087
jQuery("#replayDateHint").html("Date: " + lDateString(date));

0 commit comments

Comments
 (0)