From 334da201529465f4d6ac828b866cd830ab7bfb88 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 13 Apr 2017 10:51:08 -0400 Subject: [PATCH] Fix the geoCode js setup. Needs to be using jQuery instead of $ in the js file. Needs to be setup so the dashboard is depending on this js file. --- js/geoCoder.js | 12 ++++++------ models/front/events/detail.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/geoCoder.js b/js/geoCoder.js index f7a194b..a49fb33 100644 --- a/js/geoCoder.js +++ b/js/geoCoder.js @@ -9,15 +9,15 @@ var GLM_GeoMap = { mapType: 'small', defaultZoom: 12, setDefaultLat: function(lat) { - GLM_GeoMap.defaultLat = lat; + GLM_GeoMap.defaultLat = lat; }, setDefaultLon: function(lon) { GLM_GeoMap.defaultLon = lon; }, initialize: function() { GLM_GeoMap.createMap(); - var lat = $("#event-lat").attr('rel'); - var lon = $("#event-lon").attr('rel'); + var lat = jQuery("#event-lat").attr('rel'); + var lon = jQuery("#event-lon").attr('rel'); if (lat && lon) { GLM_GeoMap.createWithLatLon(lat, lon); } @@ -25,8 +25,8 @@ var GLM_GeoMap = { initializeLargeMap: function(){ GLM_GeoMap.mapType = 'large'; GLM_GeoMap.createMap(); - var lat = $("#event-lat").attr('rel'); - var lon = $("#event-lon").attr('rel'); + var lat = jQuery("#event-lat").attr('rel'); + var lon = jQuery("#event-lon").attr('rel'); if (lat && lon) { GLM_GeoMap.createWithLatLon(lat, lon); } @@ -89,4 +89,4 @@ var GLM_GeoMap = { lon )); } -} \ No newline at end of file +} diff --git a/models/front/events/detail.php b/models/front/events/detail.php index da80043..cec9868 100644 --- a/models/front/events/detail.php +++ b/models/front/events/detail.php @@ -85,7 +85,7 @@ class GlmMembersFront_events_detail extends GlmMembersFront_events_baseAction wp_register_script( 'event-geocoder-js', GLM_MEMBERS_EVENTS_PLUGIN_BASE_URL . '/js/geoCoder.js', - null, + array('jquery'), GLM_MEMBERS_EVENTS_PLUGIN_VERSION, true ); @@ -93,7 +93,7 @@ class GlmMembersFront_events_detail extends GlmMembersFront_events_baseAction wp_register_script( 'event-dashboard-js', GLM_MEMBERS_EVENTS_PLUGIN_BASE_URL . '/js/dashboard.js', - array('jquery-core', 'jquery-ui-datepicker','jquery-ui-autocomplete'), + array('jquery', 'jquery-ui-datepicker','jquery-ui-autocomplete', 'event-geocoder-js'), GLM_MEMBERS_EVENTS_PLUGIN_VERSION, true ); -- 2.17.1