<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html xmlns:v="urn:schemas-microsoft-com:vml"
	xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title>Workspace - ${umlModel.description}</title>

<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link type="text/css" rel="stylesheet"
	href="/WEB-CONTENT/CSS/aristo/jquery-ui-1.8.16.custom.css" />
<link type="text/css" rel="stylesheet"
	href="/WEB-CONTENT/CSS/jquery.layout.css" />
<link type="text/css" rel="stylesheet"
	href="/WEB-CONTENT/CSS/application.css" />

<script>
	var draw2dPath = "../WEB-CONTENT/draw2d/";
</script>

<SCRIPT src="/WEB-CONTENT/draw2d/lib/LAB.min.js"></SCRIPT>
<SCRIPT src="/WEB-CONTENT/draw2d/src/draw2d.js"></SCRIPT>

<script type="text/javascript">

	function draw2dLoaded() {

		$LAB.script("/WEB-CONTENT/draw2d/mason/Application.js").script(
				"/WEB-CONTENT/draw2d/mason/View.js").script(
				"/WEB-CONTENT/draw2d/mason/Toolbar.js").script(
				"/WEB-CONTENT/draw2d/mason/InnerLocator.js").script(
				"/WEB-CONTENT/draw2d/mason/Reader.js").script(
				"/WEB-CONTENT/draw2d/mason/ElementContainer.js").script(
				"/WEB-CONTENT/draw2d/mason/Relationship.js").wait(function() {

			var app = new mason.Application();

			app.loadWorkspace('${umlModel.generatedKey}');
		});
		
	};
	
</script>

</head>

<body id="container">

	<div id="global_vars">
		<span id="viewId"  style="display:none"></span>
		<span id="modelId"  style="display:none">${umlModel.generatedKey}</span>
	</div>

	<div id="content">
		<div id="toolbar"></div>
		<div id="canvas" class=""
			style="width: 1500px; height: 1500px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></div>
	</div>

	<div id="navigation" class="">
		<h1>Elements</h1>
		<div data-shape="mason.ElementContainer" data-id="-1"
			data-text="class Example"
			class="palette_node_element draw2d_droppable new" id="new-element">+</div>
		<c:forEach items="${elementList}" var="umlElement">
			<div data-shape="mason.ElementContainer" data-id="${umlElement.generatedKey}" id="${umlElement.generatedKey}" data-text="${umlElement.value}"
				class="palette_node_element draw2d_droppable">${umlElement.slug}</div>
		</c:forEach>
	</div>
</body>
</html>