2018-06-20 13:00:05 +00:00
|
|
|
$(document).ready(function() {
|
|
|
|
//nothing
|
|
|
|
});
|
|
|
|
|
|
|
|
function confirmQuit() {
|
|
|
|
Metro.dialog.create({
|
|
|
|
title: "Are you sure you want to Quit?",
|
|
|
|
content: "<div>This will will close the connection to the machine, abort any running jobs, and shutdown the OpenBuilds Machine Driver</div>",
|
|
|
|
actions: [{
|
|
|
|
caption: "Yes, Quit!",
|
|
|
|
cls: "js-dialog-close alert",
|
|
|
|
onclick: function() {
|
|
|
|
// alert("You clicked Agree action");
|
|
|
|
socket.emit('quit')
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
caption: "Cancel",
|
|
|
|
cls: "js-dialog-close",
|
|
|
|
onclick: function() {
|
|
|
|
// alert("You clicked Disagree action");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function connectionPanel() {
|
|
|
|
$('#connectionPanel').show()
|
2018-06-21 20:02:40 +00:00
|
|
|
$('#manualControlPanel').hide()
|
2018-06-25 20:13:58 +00:00
|
|
|
$('#grblPanel').hide()
|
2018-06-21 21:04:41 +00:00
|
|
|
|
2018-06-20 13:00:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function manualcontrolPanel() {
|
|
|
|
$('#connectionPanel').hide()
|
2018-06-21 20:02:40 +00:00
|
|
|
$('#manualControlPanel').show()
|
2018-06-25 20:13:58 +00:00
|
|
|
$('#grblPanel').hide()
|
2018-06-20 13:00:05 +00:00
|
|
|
}
|
|
|
|
|
2018-06-25 20:13:58 +00:00
|
|
|
function grblPanel() {
|
|
|
|
grblPopulate();
|
2018-06-20 13:00:05 +00:00
|
|
|
$('#connectionPanel').hide()
|
2018-06-21 20:02:40 +00:00
|
|
|
$('#manualControlPanel').hide()
|
2018-06-25 20:13:58 +00:00
|
|
|
$('#grblPanel').show()
|
2018-06-20 13:00:05 +00:00
|
|
|
}
|