72 lines
2.9 KiB
HTML
72 lines
2.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" id="container" onmousedown="startDrag(event)" onmouseup="stopDrag(event)" onmousemove="dragging(event)" style="overflow-x: hidden;
|
|
overflow-y: hidden; ">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="../css/bootstrap.min.css"/>
|
|
<link rel="stylesheet" href="../css/btn.css"/>
|
|
<link rel="stylesheet" href="../css/sketchBtn.css"/>
|
|
<script src="../jquery-2.1.0.min.js"></script>
|
|
<script type="text/javascript" type="text/javascript">
|
|
function SketchLeftRemoveStationSch1_RemoveSingleStationPostMessage(str){
|
|
parent.window.postMessage(
|
|
str,
|
|
"*" //or "www.parentpage.com"
|
|
);
|
|
}
|
|
|
|
function receiveMessage(event) {
|
|
//console.log(event);
|
|
switch(event.data.event_id){
|
|
case "client_response_left_removestation_main":{//case "client_response":{
|
|
var data=event.data.data;
|
|
var result=data.v1;
|
|
var ROS_String_Output=data.v2;
|
|
var Rec_Learn_String_Input=data.v3;
|
|
document.getElementById('result').innerText='result='+result;
|
|
document.getElementById('ROS_String_Output').innerText='ROS_String_Output='+ROS_String_Output;
|
|
document.getElementById('Rec_Learn_String_Input').innerText='Rec_Learn_String_Input='+Rec_Learn_String_Input;
|
|
|
|
if(ROS_String_Output=="CheckStationNodeID OK"){
|
|
RemoveStationSch1_RemoveSingleStation_CheckStationOK();
|
|
}
|
|
}break;
|
|
}
|
|
}
|
|
|
|
window.addEventListener("message", receiveMessage, false);
|
|
|
|
function Button_SetRemoveStation(nodeid){
|
|
var str="RemoveStationSch1_RemoveSingleStation:"+nodeid+"#";
|
|
SketchLeftRemoveStationSch1_RemoveSingleStationPostMessage(str);
|
|
}
|
|
|
|
function RemoveStationSch1_RemoveSingleStation_CheckStationOK(){
|
|
var str="RemoveStationSch1_RemoveSingleStation_CheckStationOK";
|
|
SketchLeftRemoveStationSch1_RemoveSingleStationPostMessage(str);
|
|
console.log("Here"+str);
|
|
}
|
|
</script>
|
|
<title>Title</title>
|
|
</head>
|
|
<body>
|
|
HMI_Sketch_Left_RemoveStation_Sch1_RemoveSingleStation
|
|
<tr>
|
|
<div id='result'></div>
|
|
<div id='ROS_String_Output'></div>
|
|
<div id='Rec_Learn_String_Input'></div>
|
|
</tr>
|
|
<p>NodeID<input type=text class="input form-control" id="NodeID" name=NodeID value="0"></input></p>
|
|
<input type=button class="btn" id="Button_SetRemoveStation" value="Button_SetRemoveStation" onclick=Button_SetRemoveStation(NodeID.value) style="background:lightblue"></input>
|
|
</body>
|
|
<script src="../js/drag.js"></script>
|
|
<script>
|
|
$(".input").focus(function(){
|
|
window.parent.parent.parent.parent.inputDom = this;
|
|
var distance = $(parent.document).scrollTop() + 500 + "px";
|
|
$(".simple-keyboard", parent.parent.parent.parent.document).css("top", distance)
|
|
$(".keyboard",parent.parent.parent.parent.document).show();
|
|
window.parent.parent.parent.parent.clearKeyboard();
|
|
})
|
|
</script>
|
|
</html> |