Skip to content

Commit

Permalink
Handlebars upgrade to version 4.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ern committed Nov 22, 2024
1 parent 385d520 commit 3b59e37
Show file tree
Hide file tree
Showing 11 changed files with 471 additions and 2,297 deletions.
1,240 changes: 0 additions & 1,240 deletions commons/tool/src/webapp/lib/handlebars.runtime-v4.0.5.js

This file was deleted.

42 changes: 1 addition & 41 deletions feedback/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,51 +114,12 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>templates</id>
<build>
<plugins>
<plugin>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars-maven-plugin</artifactId>
<version>${handlebars1.version}</version>
<executions>
<execution>
<id>precompile</id>
<phase>prepare-package</phase>
<goals>
<goal>precompile</goal>
</goals>
<configuration>
<output>${basedir}/src/webapp/templates/all.handlebars.js</output>
<prefix>${basedir}/src/webapp/WEB-INF/templates/</prefix>
<suffix>.handlebars</suffix>
<minimize>false</minimize>
<includeRuntime>false</includeRuntime>
<amd>false</amd>
<encoding>UTF-8</encoding>
<templates>
<template>content</template>
<template>home</template>
<template>emailForm</template>
<template>toolbar</template>
</templates>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars-maven-plugin</artifactId>
<version>${handlebars1.version}</version>
<version>${handlebars4.version}</version>
<executions>
<execution>
<id>precompile</id>
Expand All @@ -171,7 +132,6 @@
<prefix>${basedir}/src/webapp/WEB-INF/templates/</prefix>
<suffix>.handlebars</suffix>
<minimize>false</minimize>
<includeRuntime>false</includeRuntime>
<amd>false</amd>
<encoding>UTF-8</encoding>
<templates>
Expand Down
176 changes: 88 additions & 88 deletions feedback/src/webapp/WEB-INF/bootstrap.jsp
Original file line number Diff line number Diff line change
@@ -1,96 +1,96 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xml:lang="${language}"
lang="${language}">
<head>
<link rel="stylesheet" type="text/css" href="/feedback-tool/css/feedback.css" />
<script src="/library/webjars/jquery/1.12.4/jquery.min.js"></script>
<script src="/feedback-tool/lib/jquery.form.min.js"></script>
<script src="/library/webjars/multifile/2.2.2/jquery.MultiFile.min.js"></script>
<script src="/feedback-tool/lib/handlebars.runtime-v1.3.0.js"></script>
<script src="/feedback-tool/templates/all.handlebars.js"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="${language}"
lang="${language}">

<c:if test="${recaptchaEnabled}">
<script src="//www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
</c:if>
<head>
<link rel="stylesheet" type="text/css" href="/feedback-tool/css/feedback.css"/>

<script>
<script>
var feedback = {
state: "home",
previousState: "",
userId: "${userId}",
siteId: "${siteId}",
siteExists: "${siteExists}",
language: "${language}",
featureSuggestionUrl: "${featureSuggestionUrl}",
technicalToAddress: "${technicalToAddress}",
helpToAddress: "${helpToAddress}",
suggestionsToAddress: "${suggestionsToAddress}",
supplementalAToAddress: "${supplementalAToAddress}",
supplementalBToAddress: "${supplementalBToAddress}",
contactName: "${contactName}",
enableTechnical: "${enableTechnical}",
enableHelp: "${enableHelp}",
enableSuggestions: "${enableSuggestions}",
enableSupplementalA: "${enableSupplementalA}",
enableSupplementalB: "${enableSupplementalB}",
helpPagesUrl: "${helpPagesUrl}",
helpdeskUrl: "${helpdeskUrl}",
technicalUrl: "${technicalUrl}",
supplementalAUrl: "${supplementalAUrl}",
supplementalBUrl: "${supplementalBUrl}",
helpPagesTarget: "${helpPagesTarget}",
supplementaryInfo: "${supplementaryInfo}",
recaptchaPublicKey: "${recaptchaPublicKey}",
maxAttachmentsMB: "${maxAttachmentsMB}",
showContentPanel: "${showContentPanel}",
showHelpPanel: "${showHelpPanel}",
showTechnicalPanel: "${showTechnicalPanel}",
showSuggestionsPanel: "${showSuggestionsPanel}",
showSupplementalAPanel: "${showSupplementalAPanel}",
showSupplementalBPanel: "${showSupplementalBPanel}",
helpPanelAsLink: "${helpPanelAsLink}",
technicalPanelAsLink: "${technicalPanelAsLink}",
suggestionsPanelAsLink: "${suggestionsPanelAsLink}",
supplementalAPanelAsLink: "${supplementalAPanelAsLink}",
supplementalBPanelAsLink: "${supplementalBPanelAsLink}",
siteUpdaters: [
<c:forEach items="${siteUpdaters}" var="su" varStatus="sus">
{id: "${su.key}", displayName: "${su.value}"}<c:if test="${!sus.last}">, </c:if>
</c:forEach>
],
i18n: {
<c:forEach items="${i18n}" var="i" varStatus="is">
${i.key}: "${i.value}"<c:if test="${!is.last}">,</c:if>
</c:forEach>
}
}
</script>
${sakaiHtmlHead}
</head>

var feedback = {
state: 'home',
previousState: '',
userId: '${userId}',
siteId: '${siteId}',
siteExists: '${siteExists}',
language: '${language}',
featureSuggestionUrl: '${featureSuggestionUrl}',
technicalToAddress: '${technicalToAddress}',
helpToAddress: '${helpToAddress}',
suggestionsToAddress: '${suggestionsToAddress}',
supplementalAToAddress: '${supplementalAToAddress}',
supplementalBToAddress: '${supplementalBToAddress}',
contactName: '${contactName}',
enableTechnical: ${enableTechnical},
enableHelp: ${enableHelp},
enableSuggestions: ${enableSuggestions},
enableSupplementalA: ${enableSupplementalA},
enableSupplementalB: ${enableSupplementalB},
helpPagesUrl: '${helpPagesUrl}',
helpdeskUrl: '${helpdeskUrl}',
technicalUrl: '${technicalUrl}',
supplementalAUrl: '${supplementalAUrl}',
supplementalBUrl: '${supplementalBUrl}',
helpPagesTarget: '${helpPagesTarget}',
supplementaryInfo: '${supplementaryInfo}',
recaptchaPublicKey: '${recaptchaPublicKey}',
maxAttachmentsMB: ${maxAttachmentsMB},
showContentPanel: ${showContentPanel},
showHelpPanel: ${showHelpPanel},
showTechnicalPanel: ${showTechnicalPanel},
showSuggestionsPanel: ${showSuggestionsPanel},
showSupplementalAPanel: ${showSupplementalAPanel},
showSupplementalBPanel: ${showSupplementalBPanel},
helpPanelAsLink: ${helpPanelAsLink},
technicalPanelAsLink: ${technicalPanelAsLink},
suggestionsPanelAsLink: ${suggestionsPanelAsLink},
supplementalAPanelAsLink: ${supplementalAPanelAsLink},
supplementalBPanelAsLink: ${supplementalBPanelAsLink},
siteUpdaters: [
<c:forEach items="${siteUpdaters}" var="su" varStatus="sus">
{id: '${su.key}', displayName: '${su.value}'}<c:if test="${!sus.last}">,</c:if>
</c:forEach>
],
i18n: {
<c:forEach items="${i18n}" var="i" varStatus="is">
${i.key}: "${i.value}"<c:if test="${!is.last}">,</c:if>
</c:forEach>
}
};
</script>
<script src="/feedback-tool/js/feedbackutils.js"></script>
${sakaiHtmlHead}
</head>
<body>
<!-- wrap tool in portletBody div for PDA portal compatibility -->
<div class="portletBody container-fluid">
<ul id="feedback-toolbar" class="navIntraTool actionToolBar" role="menu"></ul>
<div id="feedback-error-message-wrapper" class="sak-banner-error">
<span></span>
</div>
<div id="feedback-info-message-wrapper" class="sak-banner-success">
<span></span>
</div>
<div id="feedback-content"></div>
</div>

<body>

<!-- wrap tool in portletBody div for PDA portal compatibility -->
<div class="portletBody">
<ul id="feedback-toolbar" class="navIntraTool actionToolBar" role="menu"></ul>
<div class="portletBody">
<div id="feedback-error-message-wrapper" class="sak-banner-error">
<span></span>
</div>
<div id="feedback-info-message-wrapper" class="sak-banner-success">
<span></span>
</div>
<div id="feedback-content"></div>
</div>
</div>
<script src="/feedback-tool/js/feedback.js"></script>
<script>includeLatestJQuery("feedback");</script>
<script>includeWebjarLibrary("multifile");</script>
<script>includeWebjarLibrary("handlebars");</script>
<script src="/library/js/jquery/form/2.43/jquery.form-2.43.js"></script>
<script src="/feedback-tool/templates/all.handlebars.js"></script>

<c:if test="${recaptchaEnabled}">
<script src="//www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
</c:if>

</body>
<script type="module">
import Feedback from "/feedback-tool/js/feedback.js";
$(document).ready(function () {
new Feedback(feedback);
});
</script>
</body>
</html>
Loading

0 comments on commit 3b59e37

Please sign in to comment.