From 1c044761301fffc157148243ef637a5e8b72ad6a Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 30 Aug 2018 13:52:36 -0400 Subject: [PATCH] Update member list view from main plugin --- glm-member-db/views/front/members/list.html | 38 +++++++++++++++------ style.css | 2 +- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/glm-member-db/views/front/members/list.html b/glm-member-db/views/front/members/list.html index e274094..85cc952 100644 --- a/glm-member-db/views/front/members/list.html +++ b/glm-member-db/views/front/members/list.html @@ -118,7 +118,7 @@ {if $settings.selected_map_interface == 1} -
+
{/if} {if $settings.selected_map_interface == 2} @@ -163,15 +163,20 @@

{/if} {*list_map_show_address*}
-

- {if $m.phone && $settings.list_map_show_phone}Phone: {apply_filters('glm_associate_phone_filter', $m.phone)}
{/if} - {if $m.toll_free && $settings.list_map_show_tollfree}{apply_filters('glm_associate_phone_filter', $m.toll_free)}
{/if} - {if $m.url && $settings.list_map_show_url}Website: {$m.url}
{/if} +

+ {if $m.phone && $settings.list_map_show_phone}Phone: {apply_filters('glm_associate_phone_filter', $m.phone)}
{/if} + {if $m.toll_free && $settings.list_map_show_tollfree}{apply_filters('glm_associate_phone_filter', $m.toll_free)}
{/if} {if $m.email && $settings.list_map_show_email}E-Mail Address: {$m.email}
{/if} - {if $m.region && $settings.list_map_show_region}Region: {$m.region}{/if} + {if $m.region && $settings.list_map_show_region}Region: {$m.region}
{/if} + {if $m.url && $settings.list_map_show_url}Website
{/if}

+ + {if $m.short_descr && $settings.list_map_show_short_descr}{$m.short_descr|truncate:200}
{/if} + {if $settings.list_map_show_detaillink && !$m.has_no_profile} + More Info + {/if} {if $m.categories && $settings.list_map_show_categories}
{$terms.term_member_cap} Categories @@ -184,7 +189,7 @@
{/if} - + {/literal} --> {if $settings.list_map_show_amenities}
Amenities: @@ -569,13 +574,23 @@ }); {/if} + var mapContainerWidth = Number(leafletMap._container.clientWidth); + var maxPopupWidth = .65 * mapContainerWidth; + if (maxPopupWidth > 600) { + maxPopupWidth = 600; + } + var mapContainerHeight = Number(leafletMap._container.clientHeight); + var maxPopupHeight = .7 * mapContainerHeight; {foreach $mapItems as $m} {if $m.lat != 0 && $m.lon != 0} // Create marker for this member and and to Feature Group var leafletMarker = L.marker([{$m.lat}, {$m.lon}], { title: '{$m.member_name|escape:quotes}' }) - .bindPopup($('#map_info_' + {$m.id}).html()) + .bindPopup($('#map_info_' + {$m.id}).html(), { + maxWidth: maxPopupWidth, + maxHeight: maxPopupHeight + }) .addTo(markerGroup); {/if} @@ -592,7 +607,8 @@ leafletMap.on('popupopen', function(e) { var px = leafletMap.project(e.popup._latlng); - px.y -= e.popup._container.clientHeight/2; + px.x -= 20; // Bump a bit to the right to avoid resize buttons + px.y -= e.popup._container.clientHeight/2; // Position more toward the center leafletMap.panTo(leafletMap.unproject(px),{ animate: true }); }); diff --git a/style.css b/style.css index 8eba3d6..3c3fc5d 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: Coldwater Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme for coldwater -Version: 1.0.8 +Version: 1.0.9 */ -- 2.17.1