From bfc45dc81d44329535c50e4cf6fb805879ad2f04 Mon Sep 17 00:00:00 2001 From: Eric Tran Date: Mon, 2 Mar 2020 20:48:45 +0000 Subject: [PATCH] Handle cases where location is not set --- public_html/index.html | 4 ++-- public_html/script.js | 51 ++++++++++++++++++++++-------------------- public_html/style.css | 4 ++-- 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/public_html/index.html b/public_html/index.html index f5a6a50..d5c5712 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -150,9 +150,8 @@
Group by Data Type
-
+
Range Rings
-
@@ -170,6 +169,7 @@
+
diff --git a/public_html/script.js b/public_html/script.js index e0af58f..dff02cd 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -263,6 +263,7 @@ function initialize() { // Set initial element visibility $("#show_map_button").hide(); + $("#range_ring_column").hide(); setColumnVisibility(); // Initialize other controls @@ -297,29 +298,6 @@ function initialize() { $("#altitude_filter_reset_button").click(onResetAltitudeFilter); - setRangeRings(); - - $('#range_rings_button').click(onSetRangeRings); - $("#range_ring_form").validate({ - errorPlacement: function(error, element) { - return true; - }, - rules: { - ringCount: { - number: true, - min: 0 - }, - baseRing: { - number: true, - min: 0 - }, - ringInterval: { - number: true, - min: 0 - } - } - }); - $('#settingsCog').on('click', function() { $('#settings_infoblock').toggle(); }); @@ -745,7 +723,32 @@ function initialize_map() { var feature = new ol.Feature(new ol.geom.Point(ol.proj.fromLonLat(SitePosition))); feature.setStyle(markerStyle); StaticFeatures.push(feature); - + + $('#range_ring_column').show(); + + setRangeRings(); + + $('#range_rings_button').click(onSetRangeRings); + $("#range_ring_form").validate({ + errorPlacement: function(error, element) { + return true; + }, + rules: { + ringCount: { + number: true, + min: 0 + }, + baseRing: { + number: true, + min: 0 + }, + ringInterval: { + number: true, + min: 0 + } + } + }); + if (SiteCircles) { createSiteCircleFeatures(); } diff --git a/public_html/style.css b/public_html/style.css index 0a3481d..feaad14 100644 --- a/public_html/style.css +++ b/public_html/style.css @@ -267,12 +267,12 @@ div#loader { z-index: 99; position: absolute; left: 0; top: 0; bottom: 0; right: .rangeOptions { width: 170px; - padding-bottom: 5px; + padding-top: 8px; text-indent: 10px; } .set_range_rings_button { - padding-top: 5px; + padding-top: 8px; } select.error, textarea.error, input.error {