diff --git a/frontend-js/src/main/js/minerva.js b/frontend-js/src/main/js/minerva.js index 98dfa933649ba9661675b2f6bbc69b097c9ec2dd..4c3a1d5f827921fc172e7ad8ee02ff9678399a37 100644 --- a/frontend-js/src/main/js/minerva.js +++ b/frontend-js/src/main/js/minerva.js @@ -35,17 +35,6 @@ var Functions = require('./Functions'); var customMap, leftPanel, topMenu, legend, mapContextMenu, selectionContextMenu; -/** - * Safari has some issue with the jquery css or the way JSF presents the CSS resources. - * This is a hack that fixes this issue by forcing the icon sprite png to be loaded once the document is ready. - */ -$('document').ready(function() { - var style = document.createElement("style"); - var styleText = document.createTextNode(".ui-icon { background-image: url(/minerva/javax.faces.resource/images/ui-icons_616161_256x240.png.xhtml?ln=primefaces-aristo&m_version=Unknown) !important; }"); - style.appendChild(styleText); - document.head.appendChild(style); -}); - /** * * @param {CustomMapOptions} params diff --git a/web/src/main/webapp/index.xhtml b/web/src/main/webapp/index.xhtml index 59e7efe6cbb829e6908fd879050ae326dc88eada..6d5cebeff462ca98f215db3bb6e671c45ef2c6d7 100644 --- a/web/src/main/webapp/index.xhtml +++ b/web/src/main/webapp/index.xhtml @@ -35,6 +35,18 @@ var btn = $.fn.button.noConflict(); // reverts $.fn.button to jqueryui btn $.fn.btn = btn; // assigns bootstrap button functionality to $.fn.btn + /** + * Safari has some issue with the jquery css or the way JSF presents the CSS resources. + * This is a hack that fixes this issue by forcing the icon sprite png to be loaded once the document is ready. + */ + $('document').ready(function() { + console.log('hi'); + var style = document.createElement("style"); + var styleText = document.createTextNode(".ui-icon { background-image: url(/minerva/javax.faces.resource/images/ui-icons_616161_256x240.png.xhtml?ln=primefaces-aristo&m_version=Unknown) !important; }"); + style.appendChild(styleText); + document.head.appendChild(style); + }); + function initMap(){ var element = document.getElementById('minervaAppDiv'); return minerva.create({