diff --git a/spatial/static/spatial/js/gridmap.js b/spatial/static/spatial/js/gridmap.js index f339ee59ea110eb24f66b630a694e39f1d5b70e1..b4f9403fa4ce0e6b40ba15a3fb905406dc26381b 100644 --- a/spatial/static/spatial/js/gridmap.js +++ b/spatial/static/spatial/js/gridmap.js @@ -39,6 +39,8 @@ let WMSLayersDateBucket = {}; let map = undefined; let popup = undefined; + + /** * Handles moving forwards/backwards in time for the current layer type (Warning status, day degrees etc) * @param {Integer} dayIndex the index in the time array (0 = first day in time series) @@ -369,6 +371,9 @@ function switchParameter(selectedParameter) switchLayer(document.getElementById("layerDateRange").value); } +var myDefaultWhiteList = $.fn.tooltip.Constructor.DEFAULTS.whiteList; +myDefaultWhiteList.i = ["aria-hidden", "onclick","style"] + async function displayQueryResult(evt) { let popupElement = popup.getElement(); @@ -442,7 +447,7 @@ async function displayQueryResult(evt) 'placement': 'top', 'animation': false, 'html': true, - 'title': gettext("Map location") + ` [${wgs84Coordinate[1].toFixed(4)}, ${wgs84Coordinate[0].toFixed(4)}]`, + 'title': gettext("Map location") + ` [${wgs84Coordinate[1].toFixed(4)}, ${wgs84Coordinate[0].toFixed(4)}] <i class="fa fa-times" style="display: inline-block; cursor: pointer; position: absolute; right: 10px;" aria-hidden="true" onclick="$(popup.getElement()).popover('destroy');"></i>`, 'content': '<h4>' + getWarningStatusTitle(currentWarningStatusLayer.Abstract, warningStatus) + '</h4>' + paramHTML }); $(popupElement).popover('show');