-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
333 lines (293 loc) · 12.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
<!DOCTYPE html>
<html>
<head>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="./materialize/css/materialize.min.css" media="screen,projection" />
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8" />
<title>Máquina de Turing 2020</title>
<script src="./vis/vis-network.js"></script>
<link href="./vis/vis-network.css" rel="stylesheet" type="text/css" />
<link href="./sweetalert/sweetalert2.min.css" rel="stylesheet" type="text/css" />
</head>
<style>
.center-wrapper {
position: relative;
width: 100%;
}
.center-forced {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
footer {
position: absolute;
bottom: 0px;
width: 100%;
}
.btn {
width: 70%;
font-size: 12pt;
}
.right {
font-weight: bold;
color: rgba(0, 192, 0, .85);
}
.wrong {
font-weight: bold;
color: rgba(255, 0, 0, .85);
}
.center-wrapper {
position: relative;
width: 100%;
}
.center-forced {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
footer {
position: absolute;
bottom: 0px;
width: 100%;
}
.btn {
width: 70%;
font-size: 12pt;
}
.h100 {
height: 100%;
}
.cp-af {
height: 60vh;
position: relative;
}
.bolder {
font-weight: bold;
}
.legenda {
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px 0 20px
}
.inicial-final {
background-color: #ffc570;
border: 2px solid #eba134;
}
.inicial {
background-color: #ccc;
border: 2px solid #555;
}
.final {
background-color: #cc5555;
border: 2px solid #ff0000;
}
.tabs .tab a {
color: #00ACC1;
}
a.active {
background-color: rgba(0, 139, 155, .2);
}
.next-step {
bottom: 20px;
right: 20px;
position: absolute;
}
.sidenav {
width: 400px !important;
padding: 20px 0 0 20px !important;
}
</style>
<body>
<div class="row">
<div id="af" class="col s12">
<div class="container">
<div class="section">
<h4 class="blue-text darken-3 center-align">Máquina de Turing 2020</h4>
</div>
<div class="section">
<div>
<span class="waves-effect waves-light blue darken-1 btn-small modal-trigger"
href="#modalUnica"><i class="material-icons left">remove</i>Única</span>
<span class="waves-effect waves-light blue darken-1 btn-small modal-trigger"
href="#modalMultipla"><i class="material-icons left">menu</i>Multiplas Entradas (4
max)</span>
<span class="waves-effect waves-light blue darken-1 btn-small modal-trigger"
href="#modalPassoAPasso"><i class="material-icons left">linear_scale</i>Passo a Passo</span>
<div class="file-field input-field" style="float: right; margin-top: 0px;">
<span class="waves-effect waves-light blue darken-1 btn-small"
style="line-height: 32.4px; height: 32.4px; margin-right: 3px;"
onclick="exportAf(event)"><i class="material-icons left">arrow_upward</i>Exportar
MT</span>
<span class="waves-effect waves-light blue darken-1 btn-small"
style="height: 32.4px; line-height: 32.4px;">
<span style="margin-top: 0px; line-height: 32.4px;"><i
class="material-icons left">arrow_downward</i>Importar MT</span>
<input type="file" style="height: 32.4px;" onchange="openFile(event)">
</span>
</div>
</div>
<div class="card-panel cp-af">
<span class="badge blue white-text" id="numOfTransitions"
data-badge-caption="Transições">0</span>
<span class="next-step waves-effect waves-light green darken-3 btn-small hide" id="nextStep"
data-badge-caption="Transições">Próximo
Passo <i class="material-icons right">play_arrow
</i></span>
<div id="canvasvis" class="h100"></div>
</div>
<div>
<p><strong>Legenda:</strong><span class="legenda inicial-final"></span>Inicial e Final<span
class="legenda inicial"></span>Inicial<span class="legenda final"></span>Final
</p>
<p><strong>Para mudar um Estado para inicial ou final: </strong><i>Clique no Estado desejado >
Menu >
Opção I ou F</i></p>
<p><strong>Para apagar um Estado ou Transição: </strong><i>Clique no Estado ou Transição
desejada > Menu
> Opção Apagar</i></p>
<p><strong>Para adicionar uma Transição: </strong><i>Menu > Opção Adicionar Transição > Clique
no Estado
de origem e arraste até o de destino</i></p>
</div>
</div>
</div>
<div class="fixed-action-btn">
<a class="btn-floating btn-large green">
<i class="large material-icons">create</i>
</a>
<ul>
<li>
<a class="btn-floating green tooltipped bolder" data-position="left"
data-tooltip="Marcar o Estado selecionado como INICIAL" id="initial">I
</a>
</li>
<li>
<a class="btn-floating green tooltipped bolder" data-position="left"
data-tooltip="Marcar/Desmarcar o Estado selecionado como FINAL" id="final">F
</a>
</li>
<li>
<a class="btn-floating blue tooltipped" data-position="left"
data-tooltip="Adicionar novo Estado" id="addNode">
<i class="material-icons">add</i>
</a>
</li>
<li>
<a class="btn-floating yellow darken-2 tooltipped" data-position="left"
data-tooltip="Adicionar nova Transição" id="addEdge">
<i class="material-icons">arrow_forward</i>
</a>
</li>
<li>
<a class="btn-floating red tooltipped" data-position="left"
data-tooltip="Apagar Estado ou Transição selecionada" id="delete">
<i class="material-icons">delete</i>
</a>
</li>
</ul>
</div>
<div id="modalUnica" class="modal bottom-sheet">
<div class="modal-content">
<h5>Entrada Única</h5>
<div class="row">
<form class="col s12">
<div class="input-field col s12">
<input id="stringUnica" type="text" class="validate">
<label for="stringUnica">String de entrada</label>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<a href="#modalUnica" class="modal-close waves-effect waves-light btn-flat">Cancela</a>
<a href="#modalUnica" class="modal-close waves-effect waves-light blue darken-1 btn-small"
id="confirmaUnica">Confirma</a>
</div>
</div>
<div id="modalMultipla" class="modal bottom-sheet">
<div class="modal-content">
<h5>Entrada Multipla</h5>
<div class="row">
<form class="col s12">
<div class="input-field col s12">
<input id="string1" type="text" class="validate">
<label for="string1">String de 1</label>
</div>
<div class="input-field col s12">
<input id="string2" type="text" class="validate">
<label for="string2">String de 2</label>
</div>
<div class="input-field col s12">
<input id="string3" type="text" class="validate">
<label for="string3">String de 3</label>
</div>
<div class="input-field col s12">
<input id="string4" type="text" class="validate">
<label for="string4">String de 4</label>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<a href="#modalMultipla" class="modal-close waves-effect waves-light btn-flat">Cancela</a>
<a href="#modalMultipla" class="modal-close waves-effect waves-light blue darken-1 btn-small"
id="confirmaMultipla">Confirma</a>
</div>
</div>
<div id="modalPassoAPasso" class="modal bottom-sheet">
<div class="modal-content">
<h5>Entrada Única - Visualização Passo-a-Passo</h5>
<div class="row">
<form class="col s12">
<div class="input-field col s12">
<input id="stringPassoAPasso" type="text" class="validate">
<label for="stringPassoAPasso">String de entrada</label>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<a href="#modalPassoAPasso" class="modal-close waves-effect waves-light btn-flat">Cancela</a>
<a href="#modalPassoAPasso" data-target="slide-out"
class="modal-close sidenav-trigger waves-effect waves-light blue darken-1 btn-small"
id="confirmaPassoAPasso">Confirma</a>
</div>
</div>
</div>
</div>
<ul id="slide-out" class="sidenav">
<div id="div">
<h5 class="blue-text darken-3">Passo-a-Passo</h4>
</div>
</ul>
<!--JavaScript at end of body for optimized loading-->
<script type="text/javascript" src="./jquery/jquery-3.4.1.js"></script>
<script type="text/javascript" src="./materialize/js/materialize.min.js"></script>
<script src="./sweetalert/sweetalert2.min.js"></script>
<script>
$(document).ready(function () {
$('.tooltipped').tooltip();
$('.modal').modal();
$('.fixed-action-btn').floatingActionButton();
$('.sidenav').sidenav();
Swal.fire({
title: 'Atenção!',
icon: 'info',
text: 'Para reiniciar sua máquina a fim de realizar novos testes você precisará recarregar a página, do contrário as funções não funcionarão para o segundo teste.',
})
});
</script>
<script type="text/javascript" src="./js/af/xml2json.js"></script>
<script type="text/javascript" src="./js/af/json2xml.js"></script>
<script type="text/javascript" src="./js/FileSaver.js"></script>
<script type="text/javascript" src="./js/af/af.js"></script>
<script type="text/javascript" src="./js/mt/class.js" defer></script>
</body>
</html>