Commit 65b07f11 authored by Lily Yan's avatar Lily Yan
Browse files

ISTWCMS-2636 Add element-invisible when no latitude and longitude

parent 860f5014
......@@ -866,6 +866,7 @@ function uw_ct_event_page_build() {
if (isset($node) && is_object($node) && $node->type == 'uw_event') {
$breadcrumb = drupal_get_breadcrumb();
$breadcrumb[1] = l(t('Events'), 'events');
drupal_add_js(drupal_get_path('module', 'uw_ct_event') . '/js/uw_ct_event.js');
// TODO: determine how to handle repeating dates (edge case)
......@@ -879,6 +880,11 @@ function uw_ct_event_page_build() {
$breadcrumb[2] = l($year, 'events/archive/' . $year);
$breadcrumb[3] = l($month_name, 'events/archive/' . $year . '-' . $month_number);
drupal_set_breadcrumb($breadcrumb);
// Add element-invisible to leaflet-container when there is no latitude and longitude.
if ($node->field_event_location[LANGUAGE_NONE][0]['latitude'] == '0.000000' && $node->field_event_location[LANGUAGE_NONE][0]['longitude'] == '0.000000') {
drupal_add_js(drupal_get_path('module', 'uw_ct_event') . '/js/leaflet-map-invisible.js');
}
}
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment