1 |
1e2b2c27
|
Tomáš Šimandl
|
<%@page contentType="text/html" pageEncoding="UTF-8"%>
|
2 |
|
|
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
3 |
|
|
|
4 |
51ce052a
|
Pavel Fidranský
|
<c:set var="APP_NAME" value="${initParam.APP_NAME}"/>
|
5 |
|
|
<c:set var="APP_HOME_URL" value="${initParam.APP_HOME_URL}"/>
|
6 |
2a2f32c2
|
Pavel Fidranský
|
<c:set var="isLoggedIn" value="${sessionScope.isLoggedIn}"/>
|
7 |
|
|
<c:set var="user" value="${sessionScope.user}"/>
|
8 |
|
|
|
9 |
1e2b2c27
|
Tomáš Šimandl
|
<!DOCTYPE html>
|
10 |
|
|
<html>
|
11 |
|
|
<head>
|
12 |
|
|
<meta charset="utf-8">
|
13 |
|
|
|
14 |
bd517b82
|
Pavel Fidranský
|
<link rel="stylesheet" href="css/common.css">
|
15 |
|
|
<link rel="stylesheet" href="css/upload-files.css">
|
16 |
1e2b2c27
|
Tomáš Šimandl
|
|
17 |
bd517b82
|
Pavel Fidranský
|
<link rel="stylesheet" href="css/components/header.css">
|
18 |
|
|
<link rel="stylesheet" href="css/components/popup.css">
|
19 |
1e2b2c27
|
Tomáš Šimandl
|
|
20 |
f8464192
|
Pavel Fidranský
|
<script id="htmlTags" type="application/json"><%@ include file="node_modules/html-tags/html-tags.json" %></script>
|
21 |
|
|
<script id="svgTags" type="application/json"><%@ include file="node_modules/svg-tags/lib/svg-tags.json" %></script>
|
22 |
|
|
|
23 |
|
|
<script src="js/components/generic/popup.js"></script>
|
24 |
|
|
<script src="js/components/loginPopup.js"></script>
|
25 |
|
|
<script src="js/components/registerPopup.js"></script>
|
26 |
|
|
|
27 |
3817d6f3
|
Pavel Fidranský
|
<script src="js/errors/abstractMethodError.js"></script>
|
28 |
edd0c51e
|
Pavel Fidranský
|
<script src="js/errors/httpError.js"></script>
|
29 |
3817d6f3
|
Pavel Fidranský
|
|
30 |
b49c7d52
|
Pavel Fidranský
|
<script src="js/events/loggedInEvent.js"></script>
|
31 |
|
|
<script src="js/events/loggedOutEvent.js"></script>
|
32 |
|
|
<script src="js/events/registeredEvent.js"></script>
|
33 |
|
|
|
34 |
edd0c51e
|
Pavel Fidranský
|
<script src="js/utils/ajax.js"></script>
|
35 |
f8464192
|
Pavel Fidranský
|
<script src="js/utils/dom.js"></script>
|
36 |
3817d6f3
|
Pavel Fidranský
|
|
37 |
edd0c51e
|
Pavel Fidranský
|
<script src="js/constants.js"></script>
|
38 |
3817d6f3
|
Pavel Fidranský
|
|
39 |
|
|
<title>${APP_NAME}</title>
|
40 |
1e2b2c27
|
Tomáš Šimandl
|
</head>
|
41 |
|
|
|
42 |
2a2f32c2
|
Pavel Fidranský
|
<body class="${isLoggedIn ? 'loggedIn' : 'loggedOut'}">
|
43 |
0ac9b68b
|
Pavel Fidranský
|
<header class="header" id="header">
|
44 |
7561b8da
|
Pavel Fidranský
|
<img src="images/logo_cs.svg" class="header-logo" alt="logo of University of West Bohemia" title="University of West Bohemia">
|
45 |
0ac9b68b
|
Pavel Fidranský
|
|
46 |
|
|
<h2 class="header-title">Interactive Multimodal Graph Explorer</h2>
|
47 |
|
|
|
48 |
65c37e8b
|
Pavel Fidranský
|
<div class="user-menu loggedInOnly">
|
49 |
c044ee46
|
Pavel Fidranský
|
<span class="username" id="usernameLabel">${user.username}</span>
|
50 |
65c37e8b
|
Pavel Fidranský
|
<button class="button" id="logoutButton">Log out</button>
|
51 |
|
|
</div>
|
52 |
|
|
|
53 |
|
|
<div class="user-menu loggedOutOnly">
|
54 |
|
|
<button class="button" id="toggleLoginPopupButton">Log in</button>
|
55 |
|
|
<button class="button" id="toggleRegisterPopupButton">Register</button>
|
56 |
|
|
</div>
|
57 |
0ac9b68b
|
Pavel Fidranský
|
</header>
|
58 |
|
|
|
59 |
26feb57f
|
Pavel Fidranský
|
<main>
|
60 |
|
|
<div class="upload-form">
|
61 |
|
|
<h3>New diagram</h3>
|
62 |
|
|
|
63 |
0ac9b68b
|
Pavel Fidranský
|
<c:if test="${not empty errorMessage}">
|
64 |
|
|
<p class="alert">${errorMessage}</p>
|
65 |
|
|
</c:if>
|
66 |
|
|
|
67 |
|
|
<form method="post" enctype="multipart/form-data">
|
68 |
|
|
<div class="form-field">
|
69 |
d8b87a02
|
Pavel Fidranský
|
<label for="file">Select JSON data file:</label><br>
|
70 |
26feb57f
|
Pavel Fidranský
|
<input type="file" name="file" id="file">
|
71 |
0ac9b68b
|
Pavel Fidranský
|
</div>
|
72 |
|
|
|
73 |
f19bcf07
|
Tomáš Šimandl
|
<div class="form-field">
|
74 |
3c3bc9ca
|
Pavel Fidranský
|
Select type of data file:<br>
|
75 |
|
|
<label for="spade"><input type="radio" name="jsonFileFormat" value="spade" id="spade" checked> Spade JSON</label><br>
|
76 |
|
|
<label for="raw"><input type="radio" name="jsonFileFormat" value="raw" id="raw"> Raw JSON</label><br>
|
77 |
f19bcf07
|
Tomáš Šimandl
|
</div>
|
78 |
|
|
|
79 |
051dcb51
|
Tomáš Šimandl
|
<button id="btnLoad" type="submit">Start visualization</button>
|
80 |
0ac9b68b
|
Pavel Fidranský
|
</form>
|
81 |
|
|
</div>
|
82 |
|
|
|
83 |
2a2f32c2
|
Pavel Fidranský
|
<div class="diagrams-menu loggedInOnly">
|
84 |
|
|
<h3>My diagrams</h3>
|
85 |
|
|
|
86 |
|
|
<ul id="privateDiagramList">
|
87 |
|
|
<c:forEach items="${diagramsPrivate}" var="diagram">
|
88 |
|
|
<li>
|
89 |
51ce052a
|
Pavel Fidranský
|
<a href="${APP_HOME_URL}graph?diagramId=${diagram.id}">${diagram.name}</a>
|
90 |
3817d6f3
|
Pavel Fidranský
|
|
91 |
|
|
<button class="button remove-diagram-button" data-id="${diagram.id}" data-name="${diagram.name}">
|
92 |
|
|
<img src="images/button_cancel.png" alt="odstranit">
|
93 |
|
|
</button>
|
94 |
2a2f32c2
|
Pavel Fidranský
|
</li>
|
95 |
|
|
</c:forEach>
|
96 |
|
|
</ul>
|
97 |
|
|
</div>
|
98 |
0ac9b68b
|
Pavel Fidranský
|
|
99 |
|
|
<div class="diagrams-menu">
|
100 |
|
|
<h3>Public diagrams</h3>
|
101 |
|
|
|
102 |
d8b87a02
|
Pavel Fidranský
|
<ul id="publicDiagramList">
|
103 |
0ac9b68b
|
Pavel Fidranský
|
<c:forEach items="${diagramsPublic}" var="diagram">
|
104 |
|
|
<li>
|
105 |
51ce052a
|
Pavel Fidranský
|
<a href="${APP_HOME_URL}graph?diagramId=${diagram.id}">${diagram.name}</a>
|
106 |
0ac9b68b
|
Pavel Fidranský
|
</li>
|
107 |
|
|
</c:forEach>
|
108 |
|
|
</ul>
|
109 |
|
|
</div>
|
110 |
|
|
</main>
|
111 |
5c9e7c19
|
Pavel Fidranský
|
|
112 |
5da25123
|
Pavel Fidranský
|
<script type="module">
|
113 |
|
|
import UploadFilesApp from './js/uploadFilesApp.js';
|
114 |
0d554903
|
Pavel Fidranský
|
|
115 |
5da25123
|
Pavel Fidranský
|
window.app = new UploadFilesApp('${APP_NAME}', '${APP_HOME_URL}');
|
116 |
0d554903
|
Pavel Fidranský
|
|
117 |
3817d6f3
|
Pavel Fidranský
|
document.addEventListener('DOMContentLoaded', () => {
|
118 |
|
|
app.run();
|
119 |
5c9e7c19
|
Pavel Fidranský
|
});
|
120 |
|
|
</script>
|
121 |
1e2b2c27
|
Tomáš Šimandl
|
</body>
|
122 |
|
|
</html>
|