Version 5.0.0 beta 6
This commit is contained in:
1 parent
57d9db6ce2
commit
fa2a720105
115 files changed
+1823
-1147
No files matched your search
@@ -52,7 +52,7 @@ if(this._initialURL===state?.url){this.hideResults();}else if(this._initialURL==
|
||||
return this._baseURL+params.join('&');},async _loadResults(url){if(this._page.length){this._page.find('[data-role="eventsOverview"]').hide();this._page.find('[data-role="searchResultsWrapper"]').show();}
|
||||
this._resultsContainer.removeClass('ipsHide').html(this.getPlaceholders(6));if(ips.getSetting('mapProvider')!=='none'){this._mapContainer.addClass('cEvents__searchMap--loading').show();}
|
||||
this._currentUrl=url;const response=await ips.fetch(url);if(response.count){this._resultsContainer.html(response.content);this._noResults.addClass('ipsHide');this._updateMap(_.extend({},this._markers,response.markers));if(response.totalCount>(response.count+this._offset)){this._loadMore.show();this._noMore.hide();}else{this._loadMore.hide();this._noMore.hide();}}else{this._resultsContainer.html('').addClass('ipsHide');this._noResults.removeClass('ipsHide');this._loadMore.hide();this._noMore.hide();this._mapContainer.hide();}
|
||||
if(response.virtual){this._mapContainer.hide();}
|
||||
if(response.virtual||!response.markerCount){this._mapContainer.hide();}
|
||||
$(document).trigger('contentChange',[this._resultsContainer]);},_updateMap(markers){if(ips.getSetting('mapProvider')==='google'){this._updateGoogleMap(markers);}else if(ips.getSetting('mapProvider')==='mapbox'){this._updateMapboxMap(markers);}else{this._mapContainer.hide();}},_updateGoogleMap(markers){if(!this._map){this._map=new window.google.maps.Map(document.querySelector('[data-role="searchResultsMap"]'));this._mapMarkers=[];}
|
||||
this._mapContainer.removeClass('cEvents__searchMap--loading');if(this._mapMarkers.length){for(let marker of Object.values(this._mapMarkers)){marker.setMap(null);}
|
||||
this._mapMarkers=[];}
|
||||
|
||||
Reference in new issue
Block a user