Fix public resource sharing.
This commit is contained in:
7
wise-webapp/src/main/resources/views/init.jsp
Normal file
7
wise-webapp/src/main/resources/views/init.jsp
Normal file
@@ -0,0 +1,7 @@
|
||||
<%@taglib uri="jakarta.tags.functions" prefix="fn" %>
|
||||
<%@taglib uri="jakarta.tags.core" prefix="c"%>
|
||||
<%
|
||||
|
||||
request.setAttribute("principal", com.wisemapping.security.Utils.getUser());
|
||||
%>
|
||||
|
53
wise-webapp/src/main/resources/views/mindmapEditor.jsp
Normal file
53
wise-webapp/src/main/resources/views/mindmapEditor.jsp
Normal file
@@ -0,0 +1,53 @@
|
||||
<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
|
||||
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ include file="init.jsp" %>
|
||||
|
||||
<%--@elvariable id="mindmap" type="com.wisemapping.model.Mindmap"--%>
|
||||
<%--@elvariable id="editorTryMode" type="java.lang.Boolean"--%>
|
||||
<%--@elvariable id="editorTryMode" type="java.lang.String"--%>
|
||||
<%--@elvariable id="lockInfo" type="com.wisemapping.service.LockInfo"--%>
|
||||
|
||||
<c:set var="baseUrl" value="${requestScope['site.baseurl']}" scope="request" />
|
||||
<c:set var="baseJsUrl" value="${requestScope['site.static.js.url']}" scope="request" />
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="${fn:substring(locale,0,2)}">
|
||||
<head>
|
||||
<base href="${baseUrl}/static/webapp/" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;600&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'" crossorigin>
|
||||
<%@ include file="pageHeaders.jsf" %>
|
||||
|
||||
<title>Loading ... | WiseMapping</title>
|
||||
|
||||
<script>
|
||||
window.serverconfig = {
|
||||
apiBaseUrl: '${requestScope['site.baseurl']}',
|
||||
analyticsAccount: '${requestScope['google.analytics.account']}',
|
||||
clientType: 'rest',
|
||||
recaptcha2Enabled: ${requestScope['google.recaptcha2.enabled']},
|
||||
recaptcha2SiteKey: '${requestScope['google.recaptcha2.siteKey']}'
|
||||
};
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var mapId = '${mindmap.id}';
|
||||
var mindmapLocked = ${mindmapLocked};
|
||||
var mindmapLockedMsg = '<spring:message code="MINDMAP_LOCKED" arguments="${lockInfo.user.fullName},${lockInfo.user.email}"/>';
|
||||
var userOptions = ${mindmap.properties};
|
||||
var accountName = '${fn:replace(principal.fullName,'\'','\\\'')}';
|
||||
var accountEmail = '${principal.email}';
|
||||
var mapTitle = '${fn:replace(mindmap.title,'\'','\\\'')}';
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root" class="mindplot-div-container"></div>
|
||||
|
||||
<script type="text/javascript" src="${baseJsUrl}/webapp/vendors.bundle.js" crossorigin="anonymous" defer></script>
|
||||
<script type="text/javascript" src="${baseJsUrl}/webapp/app.bundle.js" crossorigin="anonymous" defer></script>
|
||||
</body>
|
||||
</html>
|
120
wise-webapp/src/main/resources/views/mindmapViewonly.jsp
Normal file
120
wise-webapp/src/main/resources/views/mindmapViewonly.jsp
Normal file
@@ -0,0 +1,120 @@
|
||||
<%@page pageEncoding="UTF-8" %>
|
||||
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
|
||||
<%@include file="init.jsp" %>
|
||||
<c:set var="baseUrl" value="${requestScope['site.baseurl']}" scope="request" />
|
||||
<c:set var="baseJsUrl" value="${requestScope['site.static.js.url']}" scope="request" />
|
||||
|
||||
<%--@elvariable id="mindmap" type="com.wisemapping.model.Mindmap"--%>
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
<html lang="${fn:substring(locale,0,2)}">
|
||||
<head>
|
||||
<base href="${baseUrl}/static/mindplot/" />
|
||||
<meta name="viewport" content="initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;600&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'" crossorigin>
|
||||
<link rel="preload" href="../../css/viewonly.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
|
||||
<title>${mindmap.title} | <spring:message code="SITE.TITLE"/></title>
|
||||
<%@ include file="pageHeaders.jsf" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
var mapId = '${mindmap.id}';
|
||||
var historyId = '${hid}';
|
||||
var userOptions = ${mindmap.properties};
|
||||
var locale = '${locale}';
|
||||
var isAuth = ${principal != null};
|
||||
</script>
|
||||
|
||||
<c:if test="${requestScope['google.analytics.enabled']}">
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=${requestScope['google.analytics.account']}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '${requestScope['google.analytics.account']}',
|
||||
{
|
||||
'page_title' : 'Public View'
|
||||
});
|
||||
</script>
|
||||
</c:if>
|
||||
|
||||
<style>
|
||||
body {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
min-width: 100vw;
|
||||
min-height: 100vh;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.mindplot-div-container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="root" class="mindplot-div-container">
|
||||
<mindplot-component id="mindmap-comp"/>
|
||||
</div>
|
||||
<div id="mindplot-tooltips" className="wise-editor"></div>
|
||||
|
||||
<a href="${requestScope['site.homepage']}" target="new" aria-label="WiseMapping Homepage">
|
||||
<div id="footerLogo"></div>
|
||||
</a>
|
||||
|
||||
<div id="mapDetails">
|
||||
<span class="title"><spring:message code="CREATOR"/>:</span><span>${creatorFullName}</span>
|
||||
<span class="title"><spring:message code="DESCRIPTION"/>:</span><span>${mindmap.title}</span>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="${baseJsUrl}/mindplot/loader.js" crossorigin="anonymous" defer></script>
|
||||
|
||||
<div id="floating-panel">
|
||||
<div id="zoom-button">
|
||||
<button id="zoom-plus" title="<spring:message code="ZOOM_IN"/>" alt="<spring:message code="ZOOM_IN"/>">
|
||||
<img src="../../images/add.svg" width="24" height="24" alt="<spring:message code="ZOOM_IN"/>"/>
|
||||
</button>
|
||||
<button id="zoom-minus" title="<spring:message code="ZOOM_OUT"/>" alt="<spring:message code="ZOOM_OUT"/>">
|
||||
<img src="../../images/minus.svg" width="24" height="24" alt="<spring:message code="ZOOM_OUT"/>"/>
|
||||
</button>
|
||||
<div id="position">
|
||||
<button id="position-button" title="<spring:message code="ZOOM_TO_FIT"/>" alt="<spring:message code="ZOOM_TO_FIT"/>">
|
||||
<img src="../../images/center_focus.svg" width="24" height="24" alt="<spring:message code="ZOOM_TO_FIT"/>"/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// Hook zoom events ...
|
||||
const zoomInButton = document.getElementById('zoom-plus');
|
||||
if (zoomInButton) {
|
||||
zoomInButton.addEventListener('click', () => {
|
||||
designer.zoomIn();
|
||||
});
|
||||
}
|
||||
|
||||
const zoomOutButton = document.getElementById('zoom-minus');
|
||||
if (zoomOutButton) {
|
||||
zoomOutButton.addEventListener('click', () => {
|
||||
designer.zoomOut();
|
||||
});
|
||||
}
|
||||
|
||||
const position = document.getElementById('position');
|
||||
if (position) {
|
||||
position.addEventListener('click', () => {
|
||||
designer.zoomToFit();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
24
wise-webapp/src/main/resources/views/pageHeaders.jsf
Normal file
24
wise-webapp/src/main/resources/views/pageHeaders.jsf
Normal file
@@ -0,0 +1,24 @@
|
||||
<%@taglib uri="jakarta.tags.core" prefix="c"%>
|
||||
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="theme-color" content="#000000" />
|
||||
|
||||
<meta name="author" content="wisemapping">
|
||||
<meta name="publisher" content="wisemapping">
|
||||
<meta name="keywords"
|
||||
content="mindmap,mind map,mind maps,mindmaps,ideas,brainstorming,organize,thoughts,structure,collaboration,free,fast,simple,online,tool,knowledge,share,sharing,publish">
|
||||
<meta name="description"
|
||||
content="wisemapping is a free, fast and simple online mind mapping editor for individuals and business. sign up to start organizing and sharing your ideas and thoughts.">
|
||||
|
||||
<meta property="og:title" content="wisemapping"/>
|
||||
<meta property="og:type" content="website"/>
|
||||
<meta property="og:url" content="http://www.wisemapping.com"/>
|
||||
<meta property="og:image" content="http://www.wisemapping.com/images/logo.png"/>
|
||||
<meta property="og:site_name" content="wisemapping.com"/>
|
||||
|
||||
<link rel="icon" href="../../favicon.ico" type="image/x-icon"/>
|
||||
<link rel="apple-touch-icon" href="../../favicon.png" />
|
||||
<link rel="shortcut icon" href="../../favicon.ico" type="image/x-icon"/>
|
||||
|
||||
<sec:csrfMetaTags />
|
60
wise-webapp/src/main/resources/views/reactInclude.jsp
Normal file
60
wise-webapp/src/main/resources/views/reactInclude.jsp
Normal file
@@ -0,0 +1,60 @@
|
||||
<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
|
||||
<%@taglib uri="jakarta.tags.functions" prefix="fn" %>
|
||||
<%@taglib uri="jakarta.tags.core" prefix="c"%>
|
||||
<c:set var="baseUrl" value="${requestScope['site.baseurl']}" scope="request" />
|
||||
<c:set var="baseJsUrl" value="${requestScope['site.static.js.url']}" scope="request" />
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="${fn:substring(locale,0,2)}">
|
||||
<head>
|
||||
<base href="${baseUrl}/static/webapp/" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;600&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'" crossorigin>
|
||||
<%@ include file="pageHeaders.jsf" %>
|
||||
|
||||
<script>
|
||||
window.serverconfig = {
|
||||
apiBaseUrl: '${requestScope['site.baseurl']}',
|
||||
analyticsAccount: '${requestScope['google.analytics.account']}',
|
||||
clientType: 'rest',
|
||||
recaptcha2Enabled: ${requestScope['google.recaptcha2.enabled']},
|
||||
recaptcha2SiteKey: '${requestScope['google.recaptcha2.siteKey']}',
|
||||
googleOauth2Url: '${requestScope['security.oauth2.google.url']}'
|
||||
};
|
||||
|
||||
<%-- Hack to force view selection on react to move all the UI to react --%>
|
||||
window.errorMvcView = '${requestScope['exception']!=null?(fn:indexOf(requestScope['exception'],'SecurityException') gt 1?'securityError':'unexpectedError'):''}';
|
||||
/*
|
||||
${requestScope['exception']}
|
||||
*/
|
||||
</script>
|
||||
|
||||
<c:if test="${requestScope['google.analytics.enabled']}">
|
||||
<%-- Google Ads Sense Config. Lazy loading optimization --%>
|
||||
<script type="text/javascript">
|
||||
function downloadJsAtOnload() {
|
||||
setTimeout(function downloadJs() {
|
||||
var element = document.createElement("script");
|
||||
element.setAttribute("data-ad-client", "ca-pub-4996113942657337");
|
||||
element.async = true;
|
||||
element.src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
|
||||
document.body.appendChild(element);
|
||||
}, 50);
|
||||
};
|
||||
|
||||
window.addEventListener("load", downloadJsAtOnload, false);
|
||||
</script>
|
||||
</c:if>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
|
||||
<script type="text/javascript" src="${baseJsUrl}/webapp/vendors.bundle.js" crossorigin="anonymous" async></script>
|
||||
<script type="text/javascript" src="${baseJsUrl}/webapp/app.bundle.js" crossorigin="anonymous" async></script>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user