<div id="glm-directionsMap" class="glm-map">(directions load here)</div>
<div id="directions-panel"></div>
</div>
-
+
<div class="row">
<div id="glm-directions" class="small-12 columns glm-member-entry-container">
<div class="row">
<option value="DRIVING">Driving</option>
<option value="WALKING">Walking</option>
<option value="BICYCLING">Bicycling</option>
- <option value="TRANSIT">Transit Services</option> - Doesn't seem to work
+ <option value="TRANSIT">Transit Services</option> - Doesn't seem to work
</select>
- </div>
+ </div>
<div class="small-12 medium-8 columns">
Enter address to show directions ...
<input id="glm-startLocation" type="text" name="startLocation" class="glm-form-text-input" placeholder=""><br>
- </div>
+ </div>
</div>
<div class="row">
<div style="text-align: center;">
</div>-->
{/if}
<a id="topAnchor"></a>
-
+
<!-- <h3>{$terms.term_member_cap} Detail</h3>-->
<div class="row">
<script>//document.write('<a id="glm-member-detail-takeback-mini" class="button glm-member-button" href="' + document.referrer + '"><span>Back to listing</span></a>');</script>
<a id="glm-member-detail-website-link" class="small-12 button glm-button" data-member-id="{$member.member_pointer}" data-member-slug="{$member.member_slug}" href="{$member.url}"{if $settings.detail_show_url_newtarget} target="_blank"{/if}>Visit Website</a>
<input type="hidden" id="glm-member-detail-click-logged" value="0">
{/if}
-
+
<div id="glm-member-detail-contact-info">
- <!-- Member name, address, and basic information -->
-
+ <!-- Member name, address, and basic information -->
+
{if $settings.detail_show_address}
<div class="glm-member-detail-address-wrapper">
<small>Address</small>
{if $member.state.value}
<span>{$member.state.value}</span>
{/if}
- {if $member.zip}
+ {if $member.zip}
{$member.zip}
{/if}
</div>
- {/if}
+ {/if}
{if $member.country.name && $settings.detail_show_country}
<div>{$member.country.name}</div>
{/if}
{apply_filters('glm-member-db-front-members-detail-addressBottom', '', $member.id)}
</div>
- {/if}
+ {/if}
{apply_filters('glm-member-db-front-members-detail-otherDetailTop', '', $member.id)}
{if $member.region && $settings.detail_show_region}
<div>
{/if}
{apply_filters('glm-member-db-front-members-detail-linksBottom', '', $member.id)}
</div>
-
+
<div class="glm-member-db-socials">
{apply_filters('glm-member-db-front-members-list-memberDetailBottom', '', $member.id)}
{apply_filters('glm-member-db-front-members-social-list', '', $member.id)}
</div>
</div>
-
+
{if $settings.detail_show_map}
- <script src="http://maps.googleapis.com/maps/api/js?sensor=true&key={$settings.google_maps_api_key}"></script>
+ <script src="//maps.googleapis.com/maps/api/js?sensor=true&key={$settings.google_maps_api_key}"></script>
<div id="glm-locationMap-container">
<div id="glm-locationMap" class="glm-map small-12 columns">(map loads here)</div>
</div>
<div id="glm-member-detail-map-button" class="button map-button">view map</div>
-
+
<div id="member-lat" rel="{$member.lat}"></div>
<div id="member-lon" rel="{$member.lon}"></div>
<form id="MemberDrivingDirectionsForm" name="MemberDrivingDirectionsForm" method="post" action="">
<input type="hidden" id="MemberLon" name="MemberLon" value="{$member.lon}">
<input type="submit" class="button map-button text-center" id="MemberDrivingDirectionSubmit" name="MemberDrivingDirectionSubmit" value="Directions">
</form>
-
+
{/if}
</div>
-
+
<!-- Attributes: amenitities, credit cards, etc -->
<div id="glm-member-detail-descr-row" class="small-12 medium-8 columns">
{apply_filters('glm-member-db-front-members-detail-attributesTop', '', $member.id)}
<a class="glm-member-detail-content-toggle">Collapse</a>
<a class="glm-member-detail-link-to-top">Back to top</a>
</div>
- </div>
+ </div>
{/if}
{apply_filters('glm-member-db-front-members-detail-imageGalleryAfter', '', $member.id)}
{apply_filters('glm-member-db-front-members-detail-couponsBefore', '', $member.id)}
</div>
{/if}
{apply_filters('glm-member-db-front-members-detail-creditcardsAfter', '', $member.id)}
--->
+-->
{apply_filters('glm-member-db-front-members-detail-categoriesBefore', '', $member.id)}
{if $member.categories && $settings.detail_show_categories}
<div id="glm-member-detail-categories-toggle" class="glm-member-detail-content-toggle">Categories</div>
</div>
</div>
{/if}
-
+
{apply_filters('glm-member-db-front-members-detail-videoAfter', '', $member.id)}
-
+
{apply_filters('glm-member-db-front-members-detail-liveCamBefore', '', $member.id)}
{if $member.live_cam_type.value!=1 && $member.live_cam_url && $settings.detail_show_live_cam}
<div id="glm-member-detail-live-cam-toggle" class="glm-member-detail-content-toggle">{$terms.term_webcam_cap}</div>
</div>
</div>
{/if}
-
+
{apply_filters('glm-member-db-front-members-detail-liveCamAfter', '', $member.id)}
-
+
{apply_filters('glm-member-db-front-members-detail-dataBottom','',$member.id)}
</div>
</div>
</div>
</div>
{apply_filters('glm-member-db-front-members-detail-pageBottom', '', $member.id)}
-
+
<script type="text/javascript">
{apply_filters('glm-member-db-front-members-detail-jqueryScriptTop', '', $member.id)}
-
+
jQuery(document).ready(function($) {
- // change the member detail photos grid structure depending
+ // change the member detail photos grid structure depending
var images_container = $("#glm-member-detail-images-container");
var foundation_version = window.Foundation.version;
-
+
if( foundation_version.charAt(0) === "6" ){
images_container.children('ul').removeClass('small-block-grid-1 medium-block-grid-2 large-block-grid-3');
images_container.children('ul').addClass('row small-up-1 medium-up-2 large-up-3');
images_container.children('ul').find('li').addClass('column');
}
-
+
// Replace all non-number special characters in a phone number with the designated infix
{if $settings.phone_infix}
var processedPhone = $('.glm-member-detail-contact-phone .glm-field-value').text().trim().replace(/[^a-zA-Z0-9 ]/g, '{$settings.phone_infix}');
$('.glm-member-detail-contact-phone .glm-field-value').text(processedPhone);
{/if}
-
+
// Check a hidden field to see if this is a page refresh (doesn't detect forced reload)
var isRefresh = $("#glm-member-detail-click-logged").val();
if(window.performance && (performance.navigation.type == 1 || performance.navigation.type == 2)) {
isRefresh = 1;
}
-
+
// If this is not a refresh or reload, send AJAX action to record click.
if (isRefresh == 0) {
$.ajax({
url: "{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=memberDetailClick&memberId={$member.member_pointer}&memberSlug={$member.member_slug}"
});
- $("#glm-member-detail-click-logged").val(1);
+ $("#glm-member-detail-click-logged").val(1);
}
// Processes click-through counts for website links
$('#glm-member-detail-website-link').on('click', function() {
-
+
// Get member ID
var memberId = $(this).attr('data-member-id');
var memberSlug = $(this).attr('data-member-slug');
-
+
// Send AJAX action to record click.
$.ajax({
url: "{$ajaxUrl}?action=glm_members_admin_ajax&glm_action=memberClickThrough&memberId=" + memberId + "&memberSlug=" + memberSlug
});
-
+
});
-
- // Automatically zoom and expand the relevant
+
+ // Automatically zoom and expand the relevant
$('html').addClass('glmassociatememberdetail glmassociatetop');
if ("{$expanded}" != "") {
var expandTarget = "glm-member-detail-{$expanded}";
}, 500);
}
}
-
+
$("a.glm-member-detail-images-thumb").fancybox({
-
+
helpers: {
overlay: { locked: false },
title: { type: 'inside'},
this.title = $(this.element).find('img').attr('alt');
}
});
-
+
$("a.glm-member-detail-images-thumb").click(function(e) {
e.preventDefault();
});
-
+
$('.glm-member-detail-link-to-top').click(function () {
$('body,html').animate({
scrollTop: $("#glm-member-detail-takeback-mini").offset().top-10
}, 75);
});
-
+
// Open the appropriate section if a link is clicked
$('.link-open-detail-content-data').click(function(e) {
var target = $(this).attr("id").slice(0, -5);
scrollTop: $("#"+target+"-toggle").offset().top-{$settings.detail_top_offset_autoscroll}
}, 500);
});
-
-
+
+
// Open or close the appropriate section if a toggle is clicked
$(".glm-member-detail-content-toggle").not("#glm-member-detail-fullprofile-toggle").click(function() {
if($(this).parents('.glm-member-detail-sub-data-links').length) {
$("#"+target+"-toggle").toggleClass("selected");
fullProfileCheck(target);
});
-
+
// Change the toggle button based on whether all the content sections are expanded
function fullProfileCheck(target) {
if ($("#glm-member-detail-data-container > .glm-member-detail-content-toggle.selected").length == $("#glm-member-detail-data-container > .glm-member-detail-content-toggle").length) {
$("#glm-member-detail-fullprofile-toggle").removeClass("selected");
}
}
-
+
// Open or close every data container if the fullprofile toggle is clicked
$("#glm-member-detail-fullprofile-toggle").click(function() {
if ($(this).hasClass("selected")) {
$(this).toggleClass("selected");
}
});
-
+
// Expand the takeback button on hover. Progressively add ellipses when clicked and loading
$("#glm-member-detail-takeback-mini").click(function() {
$("#glm-member-detail-takeback-mini span").html("Loading");
$('#glm-member-detail-takeback-mini span').html("Loading ." + dots);
}, 500);
});
-
-
+
+
{if $settings.detail_show_map}
-
+
// Expand/contract map container and change the toggle button
$("#glm-member-detail-map-button").click(function() {
var mapC = "#glm-locationMap-container";
});
$(this).html(mapBtnTxt);
});
-
+
/*
* Google Maps
* API reference: https://developers.google.com/maps/documentation/javascript/reference
*/
-
+
var myLocation = false;
{if $member.lat != 0 && $member.lon != 0}
var memberlocation = new google.maps.LatLng({$member.lat}, {$member.lon});
{else}
var memberlocation = new google.maps.LatLng({$settings.maps_default_lat}, {$settings.maps_default_lon});
{/if}
-
+
function initMap() {
-
+
// Set default - Need to make this configurable
var map = new google.maps.Map(document.getElementById('glm-locationMap'), {
zoom: {$settings.maps_default_zoom},
center: memberlocation,
- disableDefaultUI: false,
- mapTypeId: google.maps.MapTypeId.MAP,
- });
-
+ disableDefaultUI: false,
+ mapTypeId: google.maps.MapTypeId.MAP,
+ });
+
// Create a marker for this member
{if $member.lat != 0 && $member.lon != 0}
- var marker = new google.maps.Marker({
- map: map,
+ var marker = new google.maps.Marker({
+ map: map,
position: new google.maps.LatLng({$member.lat}, {$member.lon}),
draggable: false,
- animation: google.maps.Animation.DROP,
+ animation: google.maps.Animation.DROP,
title: '{$member.member|escape}'
});
{/if}
//null, /* anchor is bottom center of the scaled image */
//new google.maps.Size(30, 30)
//);
- //var myMarker = new google.maps.Marker({
- //map: map,
+ //var myMarker = new google.maps.Marker({
+ //map: map,
//position: myLocation,
//draggable: false,
- //animation: google.maps.Animation.DROP,
+ //animation: google.maps.Animation.DROP,
//title: 'My Location',
//icon: pinIcon,
//zIndex: 100
//$('#glm-startLocation').attr('placeholder', 'Leave blank for your current location or enter address here.');
//});
//}
-
+
}
-
+
// Load map
google.maps.event.addDomListener(window, 'load', initMap);
-
-
+
+
{/if} {*detail_show_map*}
// Direction code is below, but since we're sending them offsite to google maps this is no longer necessary.
-//
+//
// {if $settings.detail_show_directions}
-//
+//
// var directionsDisplay;
// var directionsService = new google.maps.DirectionsService();
//
// // Display map with route from specified location to member location
// function calcRoute() {
-//
+//
// // If an address was input, use that, otherwise use detected location if available
// var start = $('#glm-startLocation').val();
// if (start == '' ) {
// start = myLocation;
// }
// }
-//
+//
// // If no start location available, tell user
// if (start == '') {
// alert('No starting location. Please enter address.');
// $('#glm-directionsMap-container').removeClass('glm-hidden');
// $('#glm-locationMap-container').addClass('glm-hidden');
// $('#glm-showLocationButton').removeClass('glm-hidden');
-//
+//
// // Initialize the directions map with a default center location
// directionsDisplay = new google.maps.DirectionsRenderer();
// var mapOptions = {
//
// // Get directions type selected
// var directionsType = $('#directionsType').find(':selected').val();
-//
+//
// // Specify origin and destination then get route
// var request = {
// origin: start,
// directionsDisplay.setPanel(document.getElementById('directions-panel'));
// }
// });
-//
+//
// // Check for first map idle (completely loaded) - Check max initial zoom
// var mapLoadedListener = google.maps.event.addListener(directionsMap, 'idle', function() {
// if (directionsMap.getZoom() > 16) {
// });
//
// }
-//
+//
// // Trigger route map either by button or input of address
// $('#glm-showDirectionsButton' ).click( function() {
// calcRoute();
// $('#glm-startLocation' ).change( function() {
// calcRoute();
// });
-//
+//
// // Switch back to member location map
// $('#glm-showLocationButton').click( function() {
-// $('#glm-directionsMap-container').addClass('glm-hidden');
+// $('#glm-directionsMap-container').addClass('glm-hidden');
// $('#glm-locationMap-container').removeClass('glm-hidden');
// $('#glm-showLocationButton').addClass('glm-hidden');
// });
-//
-// {/if} {*detail_show_directions*}
+//
+// {/if} {*detail_show_directions*}
}); // jquery
{apply_filters('glm-member-db-front-members-detail-jqueryScriptBottom', '', $member.id)}
-
+
</script>
-
+
{else}
<p>For some reason the specified {$terms.term_member} was not found. Please try again.</p>
{/if}