PCHW#53543 -- Monitor bestanden westland
svn path=/Website/branches/v2017.3/; revision=39853
This commit is contained in:
BIN
CUST/PCHW/infobord/deurbel3.mp3
Normal file
BIN
CUST/PCHW/infobord/deurbel3.mp3
Normal file
Binary file not shown.
158
CUST/PCHW/infobord/oproep.asp
Normal file
158
CUST/PCHW/infobord/oproep.asp
Normal file
@@ -0,0 +1,158 @@
|
||||
<%@language = "javascript" %>
|
||||
<%
|
||||
Session("customerId") = "PCHW";
|
||||
ANONYMOUS_Allowed = 1; // We doen echt niets geheims.
|
||||
|
||||
//var url = "http://pchw.facws001.sg.nl/branch20172/api2/issues.xml?APIKEY=yjxQIAHEAFvjtSYBrjGHbRRGMohBqeWB&logging=3";
|
||||
var url = "https://pchw.facilitor.nl/api2/issues.xml?APIKEY=yjxQIAHEAFvjtSYBrjGHbRRGMohBqeWB";
|
||||
url += "&limit=100&scope=bo&status=2&fields=id,name,requestor&order=id";
|
||||
|
||||
var refresh = getQParamInt("refresh", 50);
|
||||
var bigtime = getQParamInt("bigtime", 10);
|
||||
|
||||
%>
|
||||
<!--#include file="../../../appl/Shared/common.inc" -->
|
||||
<%
|
||||
FCLTHeader.Requires({ plugins: ["jQuery"],
|
||||
js: ["date.js"]
|
||||
});
|
||||
|
||||
var soap_req = '';
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<% FCLTHeader.Generate(); %>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: Verdana;
|
||||
}
|
||||
table.fullscreen {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
table {
|
||||
padding: 5px;
|
||||
border: 0px;
|
||||
}
|
||||
div#error {
|
||||
background-color:red;
|
||||
color:white;
|
||||
position:absolute;
|
||||
z-index: 1;
|
||||
padding:4px;
|
||||
display:none;
|
||||
}
|
||||
td.tdleft {
|
||||
color: #081638;
|
||||
background-color: white;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
vertical-align: middle;
|
||||
padding: 0;
|
||||
border-width: 4px 4px 4px 0px;
|
||||
border-style: solid;
|
||||
border-color: white;
|
||||
width: 25%;
|
||||
}
|
||||
td.empty {
|
||||
background-color: #fff;
|
||||
}
|
||||
td.tdleft span.nummer {
|
||||
font-size: 5em;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function xtext(xelm)
|
||||
{
|
||||
return xelm.textContent || xelm.text;
|
||||
}
|
||||
|
||||
var lastBigId = null;
|
||||
var currBigId = null;
|
||||
function callbackDone(data, textStatus, jqXHR)
|
||||
{
|
||||
var currBigName = "";
|
||||
$("#error").hide();
|
||||
var xmlResp = jQuery.parseXML(jqXHR.responseText);
|
||||
var data = [];
|
||||
if (xmlResp)
|
||||
{
|
||||
var issues = xmlResp.getElementsByTagName("issue");
|
||||
var bigindex = -1; // index van degene die we big gaan tonen
|
||||
for (i=0; i < issues.length; i++)
|
||||
{
|
||||
var v_id = xtext(issues[i].getElementsByTagName("id")[0]);
|
||||
var v_name = xtext(issues[i].getElementsByTagName("name")[0]);
|
||||
var v_melder = (issues[i].getElementsByTagName("requestor"));
|
||||
var v_melderid = v_melder[0].getAttribute("id");
|
||||
|
||||
if (v_id >= currBigId) // GBS
|
||||
{
|
||||
currBigId = v_id;
|
||||
currBigName = v_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Nu het grote nummer:
|
||||
var $td = $("#tdbig");
|
||||
$td.html("<span class='nummer'>" + currBigName + "</span>")
|
||||
.removeClass("empty");
|
||||
if (currBigId > lastBigId) {
|
||||
PlaySound("sound1");
|
||||
lastBigId = currBigId;
|
||||
}
|
||||
}
|
||||
function eraseBig()
|
||||
{
|
||||
var $td = $("#tdbig");
|
||||
$td.html("<span class='nummer'> </span><br><br>"
|
||||
+ "<span class='ruimte'> </span>")
|
||||
.addClass("empty");
|
||||
|
||||
}
|
||||
|
||||
function callbackFail(jqXHR, textStatus, errorThrown)
|
||||
{
|
||||
$("#error").text("FAIL: "
|
||||
+ toTimeString(new Date, true) + " "
|
||||
+ jqXHR.status + " " + (typeof errorThrown == "string"?errorThrown:errorThrown.message))
|
||||
.show();
|
||||
}
|
||||
|
||||
// Overrule de ajaxSetup.error uit FcltJquery.js
|
||||
// We willen absoluut geen alert popup's
|
||||
$.ajaxSetup(
|
||||
{"error":function(XMLHttpRequest,textStatus, errorThrown)
|
||||
{
|
||||
$("#error").text("FAIL: " + (typeof errorThrown == "string"?errorThrown:errorThrown.message))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
|
||||
function refresh()
|
||||
{
|
||||
$.get("<%= safe.jsstring(url) %>", "<%= safe.jsstring(soap_req) %>").done(callbackDone).fail(callbackFail);
|
||||
setTimeout( refresh, 1000 * <%=refresh %>);
|
||||
}
|
||||
|
||||
function PlaySound(soundObj)
|
||||
{
|
||||
var snd = new Audio("deurbel3.mp3"); // buffers automatically when created
|
||||
snd.play();
|
||||
}
|
||||
$(refresh);
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='error'></div>
|
||||
<embed src="Windows Exclamation.mp3" autostart="false" width="0" height="0" style='display:none' id="sound1" enablejavascript="true">
|
||||
<table class='fullscreen'>
|
||||
<tr><td class='tdleft' id="tdbig"></td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user