diff --git a/VERSIONS_HOTLINE/72999 b/VERSIONS_HOTLINE/72999 new file mode 100644 index 0000000000000000000000000000000000000000..9a0a5596248d0b4bafdb8903690d68d83c1b9ab3 --- /dev/null +++ b/VERSIONS_HOTLINE/72999 @@ -0,0 +1,2 @@ + - ticket #72999 : Boite biliothèque : correction de l'affichage de la carte OpenStreetMap en pagination. + \ No newline at end of file diff --git a/public/opac/js/openStreetMap/openStreetMap.js b/public/opac/js/openStreetMap/openStreetMap.js index 4bbc93532553cf447374b6b1b5ef775db7e8b9a8..203e7ed9a42e344ea9459afa34d12eec69fa5424 100644 --- a/public/opac/js/openStreetMap/openStreetMap.js +++ b/public/opac/js/openStreetMap/openStreetMap.js @@ -97,3 +97,9 @@ widget.ajaxComplete(loadMap); } } (jQuery)) + + +function initOpenStreetMap(widget) { + if (0 < $(widget).find(".leaflet_osm").length) + widget.openStreetMap(); +} diff --git a/public/opac/js/reload_module.js b/public/opac/js/reload_module.js index e53d32664161af83f923001452cc0fa2324132da..5ea129755344b597f6bdfe2439c637f9e6864d01 100644 --- a/public/opac/js/reload_module.js +++ b/public/opac/js/reload_module.js @@ -1,12 +1,14 @@ (function($) { $.fn.reload = function(url) { var boite = $(this); + $.get(url, function(data) { var new_content= $(data).children(); boite.empty().append(new_content); initializeDivisionFive(); initializePopups(); initializeReloadModule(); + initOpenStreetMap(boite); setupAnchorsTarget(); boite .boiteSlideToRight() @@ -16,7 +18,6 @@ } })(jQuery); - function initializeReloadModule() { $('.boite a[data-ajax-reload="true"]').click(function(event) { event.preventDefault();