Improve and fix print.
Support for jetty:run fixed. Several minor fixes.
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
<%--@elvariable id="mindmap" type="com.wisemapping.model.MindMap"--%>
|
||||
<%--@elvariable id="editorTryMode" type="java.lang.Boolean"--%>
|
||||
<%--@elvariable id="editorTryMode" type="java.lang.String"--%>
|
||||
<%--@elvariable id="mapXml" type="com.wisemapping.model.User"--%>
|
||||
|
||||
<%@ page import="java.text.DateFormat" %>
|
||||
<%@ page import="java.text.SimpleDateFormat" %>
|
||||
<%@ page import="java.util.Calendar" %>
|
||||
|
||||
|
||||
<%@ include file="/jsp/init.jsp" %>
|
||||
|
||||
<%
|
||||
@@ -10,82 +18,119 @@
|
||||
DateFormat dateFormat = SimpleDateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, request.getLocale());
|
||||
String todayString = dateFormat.format(calendar.getTime());
|
||||
%>
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<base href="../"/>
|
||||
<title><spring:message code="SITE.TITLE"/> - ${mindmap.title} </title>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||
<![endif]-->
|
||||
<title><spring:message code="SITE.TITLE"/> - ${mindmap.title} </title>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
|
||||
<link rel="icon" href="../images/favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/embedded.less"/>
|
||||
<style type="text/css" media="print">
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow: visible
|
||||
}
|
||||
|
||||
#embFooter {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#footerLogo {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div#printLogo {
|
||||
width: 114px;
|
||||
height: 56px;
|
||||
position: absolute;
|
||||
display: list-item;
|
||||
list-style-image: url(../images/logo-xsmall.png);
|
||||
list-style-position: inside;
|
||||
right: 10px;
|
||||
bottom: -30px;
|
||||
}
|
||||
|
||||
div#infoPanel {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type='text/javascript' src='js/mootools-core.js'></script>
|
||||
<script type='text/javascript' src='js/mootools-more.js'></script>
|
||||
<script type='text/javascript' src='js/core.js'></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../css/print.css"/>
|
||||
|
||||
<script type='text/javascript' src='../js/mootools-core.js'></script>
|
||||
<script type='text/javascript' src='../js/mootools-more.js'></script>
|
||||
<script type='text/javascript' src='../js/core.js'></script>
|
||||
|
||||
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
|
||||
|
||||
<script type="text/javascript">
|
||||
var mapId = '${mindmap.id}';
|
||||
var mapXml = '${mapXml}';
|
||||
var mindReady = false;
|
||||
var mapXml = '${mindmap.xmlAsJsLiteral}';
|
||||
$(document).addEvent('loadcomplete', function(resource) {
|
||||
mindReady = resource == 'mind' ? true : mindReady;
|
||||
if (mindReady) {
|
||||
|
||||
var editorProperties = {zoom:0.85,saveOnLoad:true,collab:'standalone',readOnly:true};
|
||||
designer = buildDesigner(editorProperties);
|
||||
// Configure designer options ...
|
||||
var options = loadDesignerOptions();
|
||||
options.size.height = options.size.height + 50;
|
||||
|
||||
var domDocument = core.Utils.createDocumentFromText(mapXml);
|
||||
var serializer = mindplot.persistence.XMLSerializerFactory.getSerializerFromDocument(domDocument);
|
||||
var mindmap = serializer.loadFromDom(domDocument, mapId);
|
||||
options.persistenceManager = new mindplot.RESTPersistenceManager("service/maps/");
|
||||
var userOptions = ${mindmap.properties};
|
||||
options.zoom = userOptions.zoom;
|
||||
|
||||
// Now, load the map ...
|
||||
designer.loadMap(mindmap);
|
||||
// Set map id ...
|
||||
options.mapId = mapId;
|
||||
|
||||
$('zoomIn').addEvent('click', function() {
|
||||
designer.zoomIn();
|
||||
});
|
||||
// Print is read only ...
|
||||
options.readOnly = true;
|
||||
|
||||
$('zoomOut').addEvent('click', function() {
|
||||
designer.zoomOut();
|
||||
});
|
||||
}
|
||||
// Build designer ...
|
||||
var designer = buildDesigner(options);
|
||||
|
||||
// Load map from XML ...
|
||||
var domDocument = core.Utils.createDocumentFromText(mapXml);
|
||||
var persistence = mindplot.PersistenceManager.getInstance();
|
||||
var mindmap = persistence.loadFromDom(mapId, domDocument);
|
||||
designer.loadMap(mindmap);
|
||||
|
||||
$('zoomIn').addEvent('click', function() {
|
||||
designer.zoomIn();
|
||||
});
|
||||
|
||||
$('zoomOut').addEvent('click', function() {
|
||||
designer.zoomOut();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body onload="setTimeout('print()', 5)">
|
||||
<body>
|
||||
|
||||
<div id="waitDialog" style="display:none">
|
||||
<div id="waitingContainer">
|
||||
<div class="loadingIcon"></div>
|
||||
<div class="loadingText">
|
||||
Loading ...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="errorDialog" style="display:none">
|
||||
<div id="errorContainer">
|
||||
<div class="loadingIcon"></div>
|
||||
<div class="loadingText">
|
||||
Unexpected error loading your map :(
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="printHeader">
|
||||
<div id="printLogo"></div>
|
||||
<div id="headerTitle">${mindmap.title}<span id="headerSubTitle"> (<%=todayString%>)</span></div>
|
||||
</div>
|
||||
<center>
|
||||
<div id="mapContainer">
|
||||
<%--<div id="infoPanel">--%>
|
||||
<%--<div id="dragImageNode" style="cursor: move">--%>
|
||||
<%--</div>--%>
|
||||
<div id="mindplot"></div>
|
||||
</center>
|
||||
<div id="printLogo"></div>
|
||||
|
||||
<div id="embFooter">
|
||||
<a href="${pageContext.request.contextPath}/c/home.htm" target="new">
|
||||
<div id="footerLogo"></div>
|
||||
</a>
|
||||
|
||||
<div id="zoomIn" class="button"></div>
|
||||
<div id="zoomOut" class="button"></div>
|
||||
|
||||
<div id="mapDetails">
|
||||
<span class="title"><spring:message code="CREATOR"/>:</span><span>${mindmap.creator}</span>
|
||||
<span class="title"><spring:message code="DESCRIPTION"/>:</span><span>${mindmap.title}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="../js/editor.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user