Skip to content
Snippets Groups Projects
Commit e06559a3 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Add close icon to popover [GRIDV-73]

parent ef73a4fa
No related branches found
No related tags found
No related merge requests found
......@@ -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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment