From: Steve Sutton Date: Fri, 18 Mar 2016 20:47:34 +0000 (-0400) Subject: Map is now working X-Git-Tag: v1.0.0^2~162^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=f82d1f70aaebcaf25f19b85ad485730eb1ba5138;p=WP-Plugins%2Fglm-member-db-events.git Map is now working need to style the popup better some wierd padding going on --- diff --git a/css/front.css b/css/front.css index 744037c..915165f 100644 --- a/css/front.css +++ b/css/front.css @@ -97,3 +97,7 @@ color: #fff; font-weight: bold; } +#eventDetail-map { + cursor: pointer; + height: 160px; +} diff --git a/js/dashboard.js b/js/dashboard.js index 350d33d..1136fae 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -5,4 +5,18 @@ $('#glm-event-detail-backtosearch').click(function(){ window.history.back(); }); + if ($('#eventDetail-map').length) { + GLM_GeoMap.initialize(); + $('#map-dialog').dialog({ + height: 480, + width: 520, + modal: true, + autoOpen: false + }); + $("#eventDetail-map").click(function(e){ + e.preventDefault(); + $("#map-dialog").dialog('open'); + GLM_GeoMap.initializeLargeMap(); + }); + } }).call(this); diff --git a/models/front/events/detail.php b/models/front/events/detail.php index b392d02..b18b9a5 100644 --- a/models/front/events/detail.php +++ b/models/front/events/detail.php @@ -40,9 +40,9 @@ class GLmMembersFront_events_detail extends GlmMembersFront_events_baseAction } else { $fromDate = date('m/d/Y'); } - $this->dateRange = "start_time >= '{$from}'"; + $this->dateRange = "start_time >= '{$fromDate}'"; - if ($eventId = filter_var($_REQUEST['eventId'], FILTER_VALIDATE_INT)) { + if ( isset($_REQUEST['eventId']) && $eventId = filter_var($_REQUEST['eventId'], FILTER_VALIDATE_INT)) { $search = true; $action = 'event-detail'; } else { @@ -58,6 +58,22 @@ class GLmMembersFront_events_detail extends GlmMembersFront_events_baseAction } $categories = $this->getCategories(); + wp_register_script( + 'googlemaps-js', + 'http://maps.googleapis.com/maps/api/js?key=', + null, + GLM_MEMBERS_EVENTS_PLUGIN_VERSION, + true + ); + wp_enqueue_script('googlemaps-js'); + wp_register_script( + 'event-geocoder-js', + GLM_MEMBERS_EVENTS_PLUGIN_BASE_URL . '/js/geoCoder.js', + null, + GLM_MEMBERS_EVENTS_PLUGIN_VERSION, + true + ); + wp_enqueue_script('event-geocoder-js'); wp_register_script( 'event-dashboard-js', GLM_MEMBERS_EVENTS_PLUGIN_BASE_URL . '/js/dashboard.js', diff --git a/views/front/events/detail.html b/views/front/events/detail.html index 3cc98e6..36fbeba 100644 --- a/views/front/events/detail.html +++ b/views/front/events/detail.html @@ -15,8 +15,13 @@
{if $event.locations}
+
+
map...
+
Loading...
+
+
+
-