Skip to content

Commit c8c02f8

Browse files
committed
Merge remote-tracking branch 'update/master' into github-pages
Update to Drupal 11 (from CornellCustomDev/CD-finder pr CornellCustomDev#19)
2 parents 944d13e + 6646e7c commit c8c02f8

9 files changed

+26
-25
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/library/drupal:10-apache
1+
FROM docker.io/library/drupal:11-apache
22
RUN composer require 'drupal/paragraphs:^1.19' \
33
&& composer require 'drupal/tome:^1.13' \
44
&& composer config --no-plugins allow-plugins.composer/installers true \

compose.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ services:
88
volumes:
99
- ./db:/mnt
1010
- ./html:/opt/drupal/html
11-
profiles:
12-
- drupal
1311

1412
static:
1513
build: .

css/bootstrap.min.css

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

db/drupal.sqlite

636 KB
Binary file not shown.

finder.info.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package: Custom
44

55
type: module
66
core: 8.x
7-
core_version_requirement: ^8 || ^9 || ^10
7+
core_version_requirement: ^8 || ^9 || ^10 || ^11
88
dependencies:
99
- paragraphs:paragraphs
1010
libraries:

finder.settings.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ email_address: [email protected]
88
email_name: Example
99
main_header: Main Header
1010
button_select_all: Select All
11-
button_clear_selections: Clear Selections
11+
button_clear_selections: Clear Selections

js/app.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@
3030
<li>\
3131
<div class='question-wrapper'>\
3232
<h4 id='question-{{id}}'>{{question}}</h4>\
33-
<a class='control-indicator collapsed' data-toggle='collapse' aria-expanded='false' aria-controls='#explanation-{{id}}' href='#explanation-{{id}}''>\
33+
<a class='control-indicator' data-bs-toggle='collapse' href='#explanation-{{id}}' role='button' aria-expanded='false' aria-controls='explanation-{{id}}'>\
3434
<span class='sr-only'>Expand {{question}}</span>\
3535
</a>\
3636
</div>\
37-
<div class='explanation collapse' id='explanation-{{id}}'>{{{description}}}</div>\
37+
<div class='collapse' id='explanation-{{id}}'>\
38+
<div class='explanation'>{{{description}}}</div>\
39+
</div>\
3840
<fieldset aria-labelledby='question-{{id}}'>\
3941
{{#choices}}\
4042
<div class='checkbox' facetid='{{id}}'>\
@@ -99,7 +101,7 @@
99101

100102
// read the data from JSON endpoints
101103

102-
$.getJSON( "/rest/finder_settings", function( response ) {
104+
$.getJSON( drupalSettings.path.baseUrl + "rest/finder_settings", function( response ) {
103105
//alert(JSON.stringify(response));
104106
$('#pagetitle').html(response.title.replace(/(?:\r\n|\r|\n)/g, '<br />'));
105107
$('#pagesubtitle').html(response.subtitle.replace(/(?:\r\n|\r|\n)/g, '<br />'));
@@ -108,6 +110,7 @@
108110
$('#pagechartheader').html(response.chart_header.replace(/(?:\r\n|\r|\n)/g, '<br />'));
109111
$('#pageemailformheader').html(response.email_form_header.replace(/(?:\r\n|\r|\n)/g, '<br />'));
110112
//$('#pageemailaddress').html(response.data.email_address);
113+
contact_email = response.email_address;
111114
//$('#pageemailname').html(response.data.email_name);
112115
//$('#pageemailbody').html(response.email_body.replace(/(?:\r\n|\r|\n)/g, '<br />'));
113116
$('#pagemainheader').html(response.main_header.replace(/(?:\r\n|\r|\n)/g, '<br />'));
@@ -116,7 +119,7 @@
116119
});
117120

118121

119-
$.getJSON( "/rest/facettree", function( response ) {
122+
$.getJSON( drupalSettings.path.baseUrl + "rest/facettree", function( response ) {
120123

121124
// JSON responses are automatically parsed.
122125

@@ -207,7 +210,7 @@
207210

208211

209212
// load the services
210-
$.getJSON( "/rest/servicelist", function( responseb ) {
213+
$.getJSON( drupalSettings.path.baseUrl + "rest/servicelist", function( responseb ) {
211214
services = responseb;
212215
//servicelist = responseb.data;
213216

@@ -568,11 +571,11 @@ function validateEmail(Email) {
568571
emailaddresses.push(email);
569572
}
570573
if ($("#emailtordmsg").prop("checked")) {
571-
emailaddresses.push("[email protected]"); // [email protected]
574+
emailaddresses.push(contact_email);
572575
}
573576
if (emailaddresses.length > 0) {
574577
var csrf_token;
575-
$.getJSON( "/rest/session/token", function( response ) {
578+
$.getJSON( drupalSettings.path.baseUrl + "rest/session/token", function( response ) {
576579
csrf_token = response.data;
577580
});
578581

js/contrib/bootstrap.min.js

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jquery.mustache.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
$.error('TemplateName: ' + templateName + ' is already mapped.');
5454
return;
5555
}
56-
templateMap[templateName] = $.trim(templateHtml);
56+
templateMap[templateName] = templateHtml.trim();
5757
}
5858

5959
/**
@@ -207,4 +207,4 @@
207207
});
208208
};
209209

210-
}(jQuery, window));
210+
}(jQuery, window));

0 commit comments

Comments
 (0)