76 lines
3.4 KiB
HTML
76 lines
3.4 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 SketchLeftRemovePathSch1_RemoveSinglePathPostMessage(str){
|
||
|
|
parent.window.postMessage(
|
||
|
|
str,
|
||
|
|
"*" //or "www.parentpage.com"
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
function receiveMessage(event) {
|
||
|
|
//console.log(event);
|
||
|
|
switch(event.data.event_id){
|
||
|
|
case "client_response_left_removepath_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=="CheckPath OK"){
|
||
|
|
RemovePathSch1_RemoveSinglePath_CheckPathOK();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
window.addEventListener("message", receiveMessage, false);
|
||
|
|
|
||
|
|
function Button_SetRemovePath(startnode,endnode){
|
||
|
|
var str="RemovePathSch1_RemoveSinglePath:"+startnode+","+endnode+"#";
|
||
|
|
SketchLeftRemovePathSch1_RemoveSinglePathPostMessage(str);
|
||
|
|
}
|
||
|
|
|
||
|
|
function RemovePathSch1_RemoveSinglePath_CheckPathOK(){
|
||
|
|
var str="RemovePathSch1_RemoveSinglePath_CheckPathOK";
|
||
|
|
SketchLeftRemovePathSch1_RemoveSinglePathPostMessage(str);
|
||
|
|
}
|
||
|
|
|
||
|
|
</script>
|
||
|
|
<title>Title</title>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<!--删除单条路径-->RemovePath_Sch1_RemoveSinglePath
|
||
|
|
<tr>
|
||
|
|
<div id='result'></div>
|
||
|
|
<div id='ROS_String_Output'></div>
|
||
|
|
<div id='Rec_Learn_String_Input'></div>
|
||
|
|
</tr>
|
||
|
|
<!-- <p>起点号<input type=text class="input form-control" id="StartNode" name=StartNode value="1"></input></p>
|
||
|
|
<p>终点号<input type=text class="input form-control" id="EndNode" name=EndNode value="2"></input></p> -->
|
||
|
|
<p>StartNode<input type=text class="input form-control" id="StartNode" name=StartNode value="1"></input></p>
|
||
|
|
<p>EndNode<input type=text class="input form-control" id="EndNode" name=EndNode value="2"></input></p>
|
||
|
|
<!-- <input type=button class="btn" id="Button_SetRemovePath" value="确认删除路径" onclick=Button_SetRemovePath(StartNode.value,EndNode.value) style="background:lightblue"></input> -->
|
||
|
|
<input type=button class="btn" id="Button_SetRemovePath" value="SetRemovePath" onclick=Button_SetRemovePath(StartNode.value,EndNode.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>
|