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

84 lines
3.1 KiB
Plaintext
Raw Normal View History

<!DOCTYPE HTML>
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="editorTryMode" type="java.lang.String"--%>
<%--@elvariable id="mapXml" type="com.wisemapping.model.User"--%>
2009-06-07 20:59:43 +02:00
<%@ include file="/jsp/init.jsp" %>
<html>
<head>
2012-06-18 00:16:39 +02:00
<base href="${pageContext.request.contextPath}/"/>
<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]-->
<link rel="stylesheet/less" type="text/css" href="css/editor.less"/>
<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>
<script type='text/javascript' src='js/less.js'></script>
2009-06-07 20:59:43 +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">
2011-10-15 07:52:44 +02:00
<script type="text/javascript">
2012-02-04 16:51:50 +01:00
$(document).addEvent('loadcomplete', function(resource) {
var mapId = '${mindmap.id}';
var mapXml = '${mindmap.xmlAsJsLiteral}';
2012-02-04 16:51:50 +01:00
// Configure designer options ...
var options = loadDesignerOptions();
2012-05-24 01:05:16 +02:00
options.persistenceManager = new mindplot.RESTPersistenceManager("service/maps/{id}/document");
2012-02-04 16:51:50 +01:00
var userOptions = ${mindmap.properties};
options.zoom = userOptions.zoom;
options.readOnly = ${!!readOnlyMode};
2012-02-04 16:51:50 +01:00
2012-04-05 05:01:51 +02:00
// Set map id ...
options.mapId = mapId;
2012-02-04 16:51:50 +01:00
// Build designer ...
var designer = buildDesigner(options);
// Load map from XML ...
2012-05-27 23:15:46 +02:00
var parser = new DOMParser();
var domDocument = parser.parseFromString(mapXml, "text/xml");
2012-02-04 16:51:50 +01:00
var persistence = mindplot.PersistenceManager.getInstance();
var mindmap = persistence.loadFromDom(mapId, domDocument);
designer.loadMap(mindmap);
});
2012-02-04 16:51:50 +01:00
</script>
2009-06-07 20:59:43 +02:00
</head>
<body>
2011-10-03 02:05:17 +02:00
<div id="actionsContainer"></div>
2009-06-07 20:59:43 +02:00
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
2012-06-18 00:16:39 +02:00
href="c/maps/"><spring:message code="MY_WISEMAPS"/></a></span> |
2012-06-20 18:28:45 +02:00
<%--<span><a id="settings" href="c/settings"--%>
<%--title="<spring:message code="ACCOUNT_DETAIL"/>"><spring:message code="ACCOUNT"/></a></span> |--%>
<span><a href="c/logout" title="<spring:message code="LOGOUT"/>">
2011-10-15 03:56:20 +02:00
<spring:message code="LOGOUT"/>
</a></span>
</div>
<a href="c/maps/">
2011-10-15 07:52:44 +02:00
<div id="headerLogo"></div>
</a>
<div id="headerMapTitle">Title: <span>${mindmap.title}</span></div>
2011-10-15 03:56:20 +02:00
</div>
2012-06-17 07:51:01 +02:00
<%@ include file="/jsp/mindmapEditorToolbar.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>
<script type="text/javascript" src="js/editor.js"></script>
2009-06-07 20:59:43 +02:00
</body>
</html>