-
Notifications
You must be signed in to change notification settings - Fork 7
/
touch.html
162 lines (149 loc) · 3.58 KB
/
touch.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
<!doctype html>
<html>
<head>
<title>Vis/Printer</title>
<meta http-equiv="content-type" content="text/html; charset=utf8">
<script src="Viewer.js"></script>
<script src="lightgl.js"></script>
<script src="util.js"></script>
<script src="VisPrinter.js"></script>
</head>
<body>
<style id=connectionStyle></style>
<style id=slicingStyle>.sliced{visibility: hidden;}</style>
<style id=stateStyle></style>
<style>
.pane, html, body{
margin: 0px;
padding: 0px;
background-color: black;
color: #888;
font-family: sans-serif;
}
#progress{
background-color:black;
font-size: 12px;
position: absolute;
width: 0%;
height: 20px;
width: 100%;
left: 0px;
bottom: 0px;
display: none;
}
#progress .cancel{
color: #fff;
position: absolute;
right: 5px;
top: 2px;
}
#progress>div{
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
border: 1px solid #fff;
}
#progressBar{
position: absolute;
left: 2px;
top: 2px;
bottom:2px;
background-color: #fff;
}
#progressName{
color: #000;
text-decoration: blink;
}
.pane{
display: none;
}
.pane h1{
margin: 10px;
padding: 0px;
height: 20px;
font-size: 20px;
}
.menu{
border-collapse: collapse;
table-layout: fixed;
}
.menu td{
width: 100px;
height: 90px;
border: 5px solid black;
text-align:center;
color: white;
background-color: #333;
}
.menu td.action{
background-color: #b00;
}
.console{
width: 195px; height: 175px;
font-size: 10px;
}
</style>
<script>
function goto(paneId){
var panes=document.querySelectorAll('.pane');
for(var i=0; i<panes.length; i++)
panes[i].style.display='none';
var pane=document.getElementById(paneId);
pane.style.display='block';
}
</script>
<div class=pane id=mainPane style="display: block;">
<h1>Main Menu</h1>
<table class=menu>
<tr>
<td class="printing not_paused" onclick="VisPrinter.cmd('pause')">pause</td>
<td class="paused" onclick="VisPrinter.cmd('resume')">resume</td>
<td class="not_printing" onclick="VisPrinter.eject()">eject</td>
</tr>
<tr>
<td onclick="VisPrinter.cmd('reset')" class=action>reset</td>
<td onclick="goto('consolePane')">CONSOLE<br>PANEL</td>
<td onclick="goto('manualPane')">MANUAL<br>MENU</td>
</tr>
</table>
</div>
<div class=pane id=consolePane>
<h1>Log</h1>
<table class=menu>
<tr><td colspan=2 rowspan=2 style="width:205px"><textarea class=console id="console"></textarea></td><td></td></tr>
<tr><td onclick="goto('mainPane')">back</td></tr>
</table>
</div>
<div class=pane id=manualPane>
<h1>Manual Control</h1>
<table class=menu>
<tr>
<td onclick="VisPrinter.prepare()">PREHEAT</td>
<td onclick="VisPrinter.cmd('M104 S0'); VisPrinter.cmd('M140 S0')" >STOP<br>HEATING</td>
<td class=action onclick="VisPrinter.cmd('G28')">GOTO HOME</td>
</tr>
<tr>
<td></td>
<td></td>
<td onclick="goto('mainPane')">back</td>
</tr>
</table>
</div>
<select name=config id=config style="display: none"></select>
<!-- <div class=logo>
Vis/Printer - http://hirnsohle.de/VisPrinter/ - © 2012 Paul Geisler -
</div>-->
<div id=progress><div><div id=progressBar><span id=progressName></span></div></div><a class=cancel href='javascript:VisPrinter.cancel()'>cancel</a></div>
<script>
HTMLElement.prototype.removeClass=function(className){
var tmp=" "+this.className+" ";
tmp=tmp.replace(" "+className+" "," ");
tmp=tmp.trim();
this.className=tmp;
}
VisPrinter.attach();
</script>
</body>
</html>