wisemapping-open-source/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp

143 lines
5.2 KiB
Plaintext
Raw Normal View History

2009-06-07 20:59:43 +02:00
<%--@elvariable id="mindmap" type="com.wisemapping.model.MindMap"--%>
<%--@elvariable id="editorTryMode" type="java.lang.Boolean"--%>
<%--@elvariable id="user" type="com.wisemapping.model.User"--%>
2011-03-28 06:33:16 +02:00
<!DOCTYPE HTML>
2009-06-07 20:59:43 +02:00
<%@ include file="/jsp/init.jsp" %>
<c:url value="mymaps.htm" var="shareMap">
<c:param name="action" value="collaborator"/>
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
</c:url>
<html>
<head>
<!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<![endif]-->
2009-07-09 22:06:08 +02:00
<title><spring:message code="SITE.TITLE"/> - ${mindmap.title} </title>
2011-10-15 03:56:20 +02:00
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
2011-10-15 07:52:44 +02:00
<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/less" type="text/css" href="../css/editor.less"/>
2009-06-07 20:59:43 +02:00
2011-10-18 14:29:29 +02:00
<script type='text/javascript' src='../js/libraries/mootools/mootools-core-1.3.2-full-compress.js'></script>
2011-10-03 01:16:57 +02:00
<script type='text/javascript' src='../js/libraries/mootools/mootools-more-1.3.2.1-yui.js'></script>
2011-10-15 03:56:20 +02:00
<script type="text/javascript" src="../dwr/engine.js"></script>
2011-10-15 18:23:27 +02:00
<script type="text/javascript" src="../dwr/interface/MapEditorService.js"></script>
<script type="text/javascript" src="../dwr/interface/LoggerService.js"></script>
2011-10-15 18:23:27 +02:00
2009-06-07 20:59:43 +02:00
<script type='text/javascript' src='../js/core.js'></script>
2011-10-15 07:52:44 +02:00
<script type='text/javascript' src='../js/less-1.1.3.min.js'></script>
2009-06-07 20:59:43 +02:00
2011-10-15 07:52:44 +02:00
<script type="text/javascript">
var mapId = '${mindmap.id}';
var mapXml = '${mapXml}';
var mindReady = false;
$(document).addEvent('loadcomplete', function(resource) {
mindReady = resource == 'mind' ? true : mindReady;
if (mindReady) {
// Configure default persistence ...
mindplot.PersistenceManager.init(new mindplot.DwrPersitenceManager());
var persistence = mindplot.PersistenceManager.getInstance();
// Initialize editor ...
var editorProperties = ${mindmap.properties};
editorProperties.collab = 'standalone';
2011-10-18 14:29:29 +02:00
editorProperties.readOnly = false;
designer = buildDesigner(editorProperties);
var domDocument = core.Utils.createDocumentFromText(mapXml);
var mindmap = persistence.loadFromDom(mapId, domDocument);
// Now, load the map ...
designer.loadMap(mindmap);
// If not problem has arisen, close the dialog ...
if (!window.hasUnexpectedErrors) {
waitDialog.deactivate();
}
}
});
</script>
2009-06-07 20:59:43 +02:00
</head>
<body>
<form method="post" id="printForm" name="printForm" action='<c:url value="export.htm"/>' style="height:100%;"
target="${mindmap.title}">
<input type="hidden" name="action" value="print">
<input type="hidden" name="mapId" value="${mindmap.id}">
2011-03-28 16:16:32 +02:00
<input type="hidden" name="mapSvg" value="">
2009-06-07 20:59:43 +02:00
</form>
<div id="waitDialog" style="display:none">
<div id="waitingContainer">
2009-06-07 20:59:43 +02:00
<div class="loadingIcon"></div>
<div class="loadingText">
2011-10-15 03:56:20 +02:00
Loading ...
2009-06-07 20:59:43 +02:00
</div>
</div>
</div>
<div id="errorDialog" style="display:none">
<div id="errorContainer">
<div class="loadingIcon"></div>
<div class="loadingText">
2011-10-15 03:56:20 +02:00
Unexpected error loading your map :(
</div>
</div>
</div>
2009-06-07 20:59:43 +02:00
<script type="text/javascript">
var waitDialog = new core.WaitDialog();
waitDialog.activate(true, $("waitDialog"));
$(window).addEvent("error", function(event) {
// Show error dialog ...
waitDialog.changeContent($("errorDialog"), false);
return false;
});
2009-06-07 20:59:43 +02:00
function printMap() {
2011-03-28 16:16:32 +02:00
document.printForm.mapSvg.value = $("workspaceContainer").innerHTML;
2009-06-07 20:59:43 +02:00
document.printForm.submit();
}
</script>
2011-10-03 02:05:17 +02:00
<div id="actionsContainer"></div>
2009-06-07 20:59:43 +02:00
<div>
<c:url value="mymaps.htm" var="shareMap">
<c:param name="action" value="collaborator"/>
<c:param name="userEmail" value="${pageContext.request.userPrincipal.name}"/>
</c:url>
</div>
2011-10-15 03:56:20 +02:00
<div id="header">
<div id="headerInfo">
<div id="headerActions">
<spring:message code="WELCOME"/>, ${principal.firstname}|<span><a
href="${pageContext.request.contextPath}/c/mymaps.htm"><spring:message code="MY_WISEMAPS"/></a></span> |
2011-10-18 14:29:29 +02:00
<span><a id="settings" href="${pageContext.request.contextPath}/c/settings.htm"
2011-10-15 03:56:20 +02:00
title="<spring:message code="SETTINGS_DETAIL"/>"><spring:message code="SETTINGS"/></a></span>
| <span><a href="${pageContext.request.contextPath}/c/logout.htm" title="<spring:message code="LOGOUT"/>">
<spring:message code="LOGOUT"/>
</a></span>
</div>
2011-10-15 07:52:44 +02:00
<a href="${pageContext.request.contextPath}/c/mymaps.htm">
<div id="headerLogo"></div>
</a>
<div id="headerMapTitle">Title: <span>${mindmap.title}</span></div>
2011-10-15 03:56:20 +02:00
</div>
<%@ include file="/jsp/toolbar.jsf" %>
2011-10-15 03:56:20 +02:00
</div>
2009-06-07 20:59:43 +02:00
2011-10-15 03:56:20 +02:00
<div id="mindplot"></div>
2009-06-07 20:59:43 +02:00
<script type="text/javascript" src="../js/editor.js"></script>
</body>
</html>