init web ems all
This commit is contained in:
64
wxc2_omc/fault/networkStatus/dragElement.php
Executable file
64
wxc2_omc/fault/networkStatus/dragElement.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<script language="JavaScript">
|
||||
function beginDrag(elementToDrag,event)
|
||||
{
|
||||
var deltaX=event.clientX-parseInt(elementToDrag.style.left);
|
||||
var deltaY=event.clientY-parseInt(elementToDrag.style.top);
|
||||
|
||||
if(document.addEventListener)
|
||||
{
|
||||
document.addEventListener("mousemove",moveHandler,true);
|
||||
document.addEventListener("mouseup",upHandler,true);
|
||||
}
|
||||
else if(document.attachEvent)
|
||||
{
|
||||
document.attachEvent("onmousemove",moveHandler);
|
||||
document.attachEvent("onmouseup",upHandler);
|
||||
}
|
||||
|
||||
if(event.stopPropagation)
|
||||
event.stopPropagation();
|
||||
else
|
||||
event.cancelBubble=true;
|
||||
|
||||
if(event.preventDefault)
|
||||
event.preventDefault();
|
||||
else
|
||||
event.returnValue=false;
|
||||
|
||||
function moveHandler(e)
|
||||
{
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>if (!e) e=window.event; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IE<49><45><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD><C3B4><EFBFBD><EFBFBD>window.event
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>//ȫ<><C8AB><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD><D4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DOM<4F><4D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7BC>Event<6E><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
elementToDrag.style.left=(event.clientX-deltaX)+"px";
|
||||
elementToDrag.style.top=(event.clientY-deltaY)+"px";
|
||||
|
||||
if(event.stopPropagation)
|
||||
event.stopPropagation();
|
||||
else
|
||||
event.cancelBubble=true;
|
||||
}
|
||||
|
||||
function upHandler(e)
|
||||
{
|
||||
|
||||
if(document.removeEventListener)
|
||||
{
|
||||
document.removeEventListener("mouseup",upHandler,true);
|
||||
document.removeEventListener("mousemove",moveHandler,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
document.detachEvent("onmouseup",upHandler);
|
||||
document.detachEvent("onmousemove",moveHandler);
|
||||
}
|
||||
window.location.href='./mapStatus.php?command=save&drag_x='+elementToDrag.style.left+"&drag_y="+elementToDrag.style.top+"&drag_key_led_num="+elementToDrag.id+"&needDragElement="+needDragElement+"&showingPageType="+showingPageType+"&typeOffset="+typeOffset+"&maxPageNum="+maxPageNum+"&maxLedNum="+maxLedNum+"&bg_img="+bg_img;
|
||||
|
||||
}
|
||||
|
||||
if(event.stopPropagation)
|
||||
event.stopPropagation();
|
||||
else
|
||||
event.cancelBubble=true;
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user