Skip to content

Commit

Permalink
edit popup template
Browse files Browse the repository at this point in the history
  • Loading branch information
otrok7 committed Jan 6, 2024
1 parent fccaa86 commit 3e9ab27
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions croutonjs/meetingMap/js/meeting_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function MeetingMap(inConfig) {
const config = inConfig;
if (!config.maxZoom) config.maxZoom = 17;
if (!config.minZoom) config.minZoom = 6;
if (!config.marker_contents_template) config.marker_contents_template = croutonDefaultTemplates.marker_contents_template;
var gAllMeetings = null;
var gMeetingIdsFromCrouton = null;
var loadedCallbackFunction = null;
Expand All @@ -26,6 +27,7 @@ function MeetingMap(inConfig) {

function loadMap(inDiv, menuContext, handlebarMapOptions=null,cb=null) {
if (inDiv) {
crouton_Handlebars.registerPartial("markerContentsTemplate", config['marker_contents_template']);
gInDiv = inDiv;
createThrobber(inDiv);
if (!config.map_search) showThrobber();
Expand Down
1 change: 1 addition & 0 deletions croutonjs/meetingMap/meeting_map.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ private function createJavascriptConfig($options)
}
$ret .= '},';
}
$ret .= '"marker_contents_template":'.json_encode($options['marker_contents_template']);
$ret .= '},';
return $ret;
}
Expand Down
4 changes: 0 additions & 4 deletions croutonjs/src/js/crouton-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,13 @@ function Crouton(config) {
theme: "jack", // Allows for setting pre-packaged themes. Choices are listed here: https://github.com/bmlt-enabled/crouton/blob/master/croutonjs/dist/templates/themes
meeting_data_template: croutonDefaultTemplates.meeting_data_template,
metadata_template: croutonDefaultTemplates.metadata_template,
marker_contents_template: croutonDefaultTemplates.marker_contents_template,
observer_template: croutonDefaultTemplates.observer_template,
meeting_count_template: croutonDefaultTemplates.meeting_count_template,
meeting_link_template: croutonDefaultTemplates.meeting_link_template,
meeting_modal_template: croutonDefaultTemplates.meeting_modal_template,
meetingpage_title_template: croutonDefaultTemplates.meetingpage_title_template,
meetingpage_contents_template: croutonDefaultTemplates.meetingpage_contents_template,
meetingpage_frame_template: croutonDefaultTemplates.meetingpage_frame_template,
marker_contents_template: croutonDefaultTemplates.marker_contents_template,
lat: 0,
lng: 0,
zoom: 10,
Expand Down Expand Up @@ -680,14 +678,12 @@ function Crouton(config) {

crouton_Handlebars.registerPartial("meetingDataTemplate", self.config['meeting_data_template']);
crouton_Handlebars.registerPartial("metaDataTemplate", self.config['metadata_template']);
crouton_Handlebars.registerPartial("popupTemplate", self.config['marker_contents_template']);
crouton_Handlebars.registerPartial("observerTemplate", self.config['observer_template']);
crouton_Handlebars.registerPartial("meetingpageTitleTemplate", self.config['meetingpage_title_template']);
crouton_Handlebars.registerPartial("meetingpageContentsTemplate", self.config['meetingpage_contents_template']);
crouton_Handlebars.registerPartial("meetingCountTemplate", self.config['meeting_count_template']);
crouton_Handlebars.registerPartial("meetingLink", self.config['meeting_link_template']);
crouton_Handlebars.registerPartial("meetingModal", self.config['meeting_modal_template']);
crouton_Handlebars.registerPartial("markerContentsTemplate", self.config['marker_contents_template']);

for (var m = 0; m < meetingData.length; m++) {
meetingData[m]['formatted_comments'] = meetingData[m]['comments'];
Expand Down

0 comments on commit 3e9ab27

Please sign in to comment.