|
@@ -39,30 +39,36 @@ function createButtons(i, item){
|
|
function createSpecialButtons(i, item){
|
|
function createSpecialButtons(i, item){
|
|
var clone = document.importNode(document.querySelector('#Buttonentryspecial').content,true);
|
|
var clone = document.importNode(document.querySelector('#Buttonentryspecial').content,true);
|
|
|
|
|
|
-
|
|
|
|
$('[data-class=entryitem]',clone).text(item["Label"]);
|
|
$('[data-class=entryitem]',clone).text(item["Label"]);
|
|
$('[data-class=entryitem]',clone).attr('onclick', "buttonclick('" + item["File"] + "','" + item["Image"] + "','" + item["Label"] + "')");
|
|
$('[data-class=entryitem]',clone).attr('onclick', "buttonclick('" + item["File"] + "','" + item["Image"] + "','" + item["Label"] + "')");
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
$('[data-class=entrydiv]',clone).css({"left": item["PositionX"], "top": item["PositionY"] });
|
|
$('[data-class=entrydiv]',clone).css({"left": item["PositionX"], "top": item["PositionY"] });
|
|
$('[data-class=entryitem]',clone).css({"width": item["SizeX"], "height": item["SizeY"]});
|
|
$('[data-class=entryitem]',clone).css({"width": item["SizeX"], "height": item["SizeY"]});
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
$('#ButtonRows').append(clone);
|
|
$('#ButtonRows').append(clone);
|
|
}
|
|
}
|
|
|
|
|
|
function buttonclick(imgfile, imgimg, buttontext){
|
|
function buttonclick(imgfile, imgimg, buttontext){
|
|
//alert(imgimg);
|
|
//alert(imgimg);
|
|
- $("#actualbuttonImage").attr("src","https://centurio.work/customers/evva/universal-storage/storage/Laser/VorschauBilder/" + imgimg)
|
|
|
|
|
|
+ $("#actualbuttonImage").attr("src","https://centurio.evva.com/departments/emontage/universal-storage/storage/Laser/VorschauBilder/" + imgimg)
|
|
|
|
|
|
$("#currentFile").text("Current Selection: " + buttontext);
|
|
$("#currentFile").text("Current Selection: " + buttontext);
|
|
|
|
|
|
$("#ButtonRows").hide();
|
|
$("#ButtonRows").hide();
|
|
$("#buttonImage").show();
|
|
$("#buttonImage").show();
|
|
|
|
|
|
|
|
+ breakmarking();
|
|
|
|
+
|
|
|
|
+ LoadNewFile(imgfile)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
function showallbuttons(){
|
|
function showallbuttons(){
|
|
@@ -70,13 +76,14 @@ function showallbuttons(){
|
|
$("#ButtonRows").show();
|
|
$("#ButtonRows").show();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
function updateloadfiledropdown(){
|
|
function updateloadfiledropdown(){
|
|
$('#loadfiledropdown')
|
|
$('#loadfiledropdown')
|
|
.find('option')
|
|
.find('option')
|
|
.remove()
|
|
.remove()
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "GET",
|
|
type: "GET",
|
|
- url: "/listfiles",
|
|
|
|
|
|
+ url: "http://172.16.14.236:9337/listfiles",
|
|
datatype: "json",
|
|
datatype: "json",
|
|
success: function(data){
|
|
success: function(data){
|
|
$(data).each(function(item, val){
|
|
$(data).each(function(item, val){
|
|
@@ -91,8 +98,9 @@ function ListFiles() {
|
|
updateloadfiledropdown()
|
|
updateloadfiledropdown()
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "GET",
|
|
type: "GET",
|
|
- url: "/listfiles",
|
|
|
|
|
|
+ url: "http://172.16.14.236:9337/listfiles",
|
|
datatype: "json",
|
|
datatype: "json",
|
|
|
|
+ async: false,
|
|
success: function(data){
|
|
success: function(data){
|
|
$("#loadedfiles").text(JSON.stringify(data, undefined, 2))
|
|
$("#loadedfiles").text(JSON.stringify(data, undefined, 2))
|
|
}
|
|
}
|
|
@@ -100,11 +108,12 @@ function ListFiles() {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-function LoadNewFile() {
|
|
|
|
|
|
+function LoadNewFile(filename) {
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "GET",
|
|
type: "GET",
|
|
- url: "/setfile?filename=" + $("#loadfiledropdown :selected").text(),
|
|
|
|
|
|
+ url: "http://172.16.14.236:9337/setfile?filename=" + filename,
|
|
datatype: "json",
|
|
datatype: "json",
|
|
|
|
+ async: false,
|
|
success: function(data){
|
|
success: function(data){
|
|
|
|
|
|
}
|
|
}
|
|
@@ -115,8 +124,9 @@ function LoadNewFile() {
|
|
function ShowLoadedFile() {
|
|
function ShowLoadedFile() {
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "GET",
|
|
type: "GET",
|
|
- url: "/getfile",
|
|
|
|
|
|
+ url: "http://172.16.14.236:9337/getfile",
|
|
datatype: "json",
|
|
datatype: "json",
|
|
|
|
+ async: false,
|
|
success: function(data){
|
|
success: function(data){
|
|
$("#loadedfile").text(JSON.stringify(data, undefined, 2))
|
|
$("#loadedfile").text(JSON.stringify(data, undefined, 2))
|
|
}
|
|
}
|
|
@@ -126,8 +136,9 @@ function ShowLoadedFile() {
|
|
function ShowStats() {
|
|
function ShowStats() {
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "GET",
|
|
type: "GET",
|
|
- url: "/statistics",
|
|
|
|
|
|
+ url: "http://172.16.14.236:9337/statistics",
|
|
datatype: "json",
|
|
datatype: "json",
|
|
|
|
+ async: false,
|
|
success: function(data){
|
|
success: function(data){
|
|
$("#stats").text(JSON.stringify(data, undefined, 2))
|
|
$("#stats").text(JSON.stringify(data, undefined, 2))
|
|
}
|
|
}
|
|
@@ -137,8 +148,9 @@ function ShowStats() {
|
|
function ShowInputstates() {
|
|
function ShowInputstates() {
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "GET",
|
|
type: "GET",
|
|
- url: "/getinputstate",
|
|
|
|
|
|
+ url: "http://172.16.14.236:9337/getinputstate",
|
|
datatype: "json",
|
|
datatype: "json",
|
|
|
|
+ async: false,
|
|
success: function(data){
|
|
success: function(data){
|
|
$("#inputstates").text(JSON.stringify(data, undefined, 2))
|
|
$("#inputstates").text(JSON.stringify(data, undefined, 2))
|
|
}
|
|
}
|
|
@@ -148,8 +160,9 @@ function ShowInputstates() {
|
|
function SetText() {
|
|
function SetText() {
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "GET",
|
|
type: "GET",
|
|
- url: "/settext?t=0&val=" + $("#seriennummber").val(),
|
|
|
|
|
|
+ url: "http://172.16.14.236:9337/settext?t=0&val=" + $("#seriennummber").val(),
|
|
datatype: "json",
|
|
datatype: "json",
|
|
|
|
+ async: false,
|
|
success: function(data){
|
|
success: function(data){
|
|
$("#inputstates").text(JSON.stringify(data, undefined, 2))
|
|
$("#inputstates").text(JSON.stringify(data, undefined, 2))
|
|
}
|
|
}
|
|
@@ -160,8 +173,9 @@ function SetText() {
|
|
function SetSlot(slot) {
|
|
function SetSlot(slot) {
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "GET",
|
|
type: "GET",
|
|
- url: "/setslot?t=" + slot +"&val=" + $("#slotvalue").val(),
|
|
|
|
|
|
+ url: "http://172.16.14.236:9337/setslot?t=" + slot +"&val=" + $("#slotvalue").val(),
|
|
datatype: "json",
|
|
datatype: "json",
|
|
|
|
+ async: false,
|
|
success: function(data){
|
|
success: function(data){
|
|
$("#laserwrite").text("Seriennummer: " + $("#slotvalue").val() + " geschrieben.")
|
|
$("#laserwrite").text("Seriennummer: " + $("#slotvalue").val() + " geschrieben.")
|
|
}
|
|
}
|
|
@@ -172,14 +186,39 @@ function SetSlot(slot) {
|
|
function GetSlot(slot) {
|
|
function GetSlot(slot) {
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "GET",
|
|
type: "GET",
|
|
- url: "/getslot?t=" + slot,
|
|
|
|
|
|
+ url: "http://172.16.14.236:9337/getslot?t=" + slot,
|
|
datatype: "json",
|
|
datatype: "json",
|
|
|
|
+ async: false,
|
|
success: function(data){
|
|
success: function(data){
|
|
$("#getSlot").text(JSON.stringify(data, undefined, 2))
|
|
$("#getSlot").text(JSON.stringify(data, undefined, 2))
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+function breakmarking() {
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "GET",
|
|
|
|
+ url: "http://172.16.14.236:9337/breakmarking",
|
|
|
|
+ datatype: "json",
|
|
|
|
+ async: false,
|
|
|
|
+ success: function(data){
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function resumemarking() {
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "GET",
|
|
|
|
+ url: "http://172.16.14.236:9337/resumemarking",
|
|
|
|
+ datatype: "json",
|
|
|
|
+ async: false,
|
|
|
|
+ success: function(data){
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|
|
function ShowOutputStates() {
|
|
function ShowOutputStates() {
|
|
alert("Not yet implemented");
|
|
alert("Not yet implemented");
|
|
}
|
|
}
|
|
@@ -188,7 +227,7 @@ function ShowOutputStates() {
|
|
function StartLaser() {
|
|
function StartLaser() {
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "GET",
|
|
type: "GET",
|
|
- url: "/startlaser",
|
|
|
|
|
|
+ url: "http://172.16.14.236:9337/startlaser",
|
|
datatype: "json",
|
|
datatype: "json",
|
|
success: function(data){
|
|
success: function(data){
|
|
$("#startlaser").text("Laser gestartet.")
|
|
$("#startlaser").text("Laser gestartet.")
|
|
@@ -196,6 +235,19 @@ function StartLaser() {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+function GetSerialFromServer() {
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "GET",
|
|
|
|
+ url: "http://172.16.14.236:9337/getSerialnumber",
|
|
|
|
+ datatype: "json",
|
|
|
|
+ success: function(data){
|
|
|
|
+ $("#slotvalue").val(data["sn"])
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
<body>
|
|
<body>
|
|
<div id="LogoTop">
|
|
<div id="LogoTop">
|
|
@@ -225,7 +277,15 @@ function StartLaser() {
|
|
<div id="buttonImage" class="paddingleft3" >
|
|
<div id="buttonImage" class="paddingleft3" >
|
|
<img id="actualbuttonImage" style="max-height:700px" src="" alt=""><br>
|
|
<img id="actualbuttonImage" style="max-height:700px" src="" alt=""><br>
|
|
<button onclick="showallbuttons()" style="margin-top:3em; padding:2em;">Zurück zur File auswahl</button>
|
|
<button onclick="showallbuttons()" style="margin-top:3em; padding:2em;">Zurück zur File auswahl</button>
|
|
- <span id="currentFile"></span>
|
|
|
|
|
|
+ <span id="currentFile"></span><br>
|
|
|
|
+
|
|
|
|
+ <div class="paddingtop3">
|
|
|
|
+ Seriennummer: <input id="slotvalue"></input>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <button onclick="GetSerialFromServer()" style="margin-top:3em; padding:2em;">GetSerialNumber</button><br>
|
|
|
|
+
|
|
|
|
+
|
|
<br>
|
|
<br>
|
|
|
|
|
|
</div>
|
|
</div>
|