Files
2016-03-06 21:35:53 +01:00

97 lines
3.0 KiB
HTML

<!doctype html>
<html>
<head>
<title>Quantum telescope</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="stylesheet" type="text/css" href="{{resource("css/style.css")}}">
</head>
<body style="overflow:hidden;background-color: black;margin: 0; padding: 0;">
<div id="content" class="tight" style="width:800px;height:435px">
<div id="contentInner" class="tight" style="z-index:0;position:fixed;width:600px;height:400px"></div>
<div id="contentInspect" class="tight" style="background-color: black;z-index:9;color:green;display:none;position:fixed;width:600px;height:400px"></div>
<div id="contentSide" class="tight" style="background-color: black;z-index:9;position:fixed;overflow:auto;color: green;border: 1px solid;border-color: #ccc;top:0px;left:600px;width:198px;height:399px"></div>
<div id="contentBottom" class="tight" style="background-color: black;z-index:9;border: 1px solid;border-color: #ccc;position:fixed;top:400px;left:0px;width:599px;height:33px">
<div style="color:green;margin:3px;">
<div style="padding:5px;display:inline-block;width:50px;height:15px;border: 1px solid;border-color: #ccc;background-color: #333" id="scanbutt">Scan</div><div id="statusText" style="margin-left: 10px;display:inline;">Ready ...</div>
</div>
</div>
<div id="contentContact" class="tight" style="background-color: black;padding-top:8px;color:green;text-align: center;border: 1px solid;border-color: #ccc;position:fixed;top:400px;left:600px;width:198px;height:25px"></div>
</div>
<script src="{{resource("js/jquery.min.js")}}"></script>
<script src="{{resource("js/jquery.migrate.js")}}"></script>
<script src="{{resource("js/jquery-ui.min.js")}}"></script>
<script type="text/javascript">
var tabs;
var ref;
var scanInterval;
var scanRunning;
var setRef = function setRef(theRef) {
ref = theRef;
};
function callByond(action, data)
{
var newLoc = '?src=' + ref + ';jscall=' + action + ';' + data.join(';');
window.location = newLoc;
}
function setHtmlId(element, data)
{
$(element).html(data);
}
function showContact()
{
$( "#contentInspect" ).show();
}
function scanProcess()
{
var p = $("#scan");
var posX = (p.position().left + 4);
p.offset({ top: 0, left: posX});
if (posX >= 600) {
p.hide();
clearInterval(window.scanInterval);
scanRunning = 0;
setHtmlId("#statusText", "Idle ...");
callByond("scanComplete", ["posx=" + ($('#scanner').position().left + 25).toString() + "&" + "posy=" + ($('#scanner').position().top + 25).toString() ]);
}
}
function showScan()
{
if(window.scanRunning){
return;
}
setHtmlId("#statusText", "Scanning ...");
$("#scan").show();
$("#scan").offset({ top: 0, left: 0});
scanInterval = setInterval(scanProcess, 25);
scanRunning = 1;
}
$(function(){
$( "#scanbutt" ).click(function( event ) {
showScan();
});
$( "#contentContact" ).click(function( event ) {
callByond("contact", []);
});
$( "#contentInspect" ).click(function( event ) {
$( "#contentInspect" ).hide();
});
});
</script>
</body>
</html>