2 |
<head> |
<head> |
3 |
<title>Koha RFID</title> |
<title>Koha RFID</title> |
4 |
|
|
5 |
<script type="text/javascript" src="/jquery-1.3.2.js"></script> |
<script type="text/javascript" src="jquery-1.3.2.js"></script> |
6 |
<script type="text/javascript" src="/meteor.js"></script> |
<script type="text/javascript" src="meteor.js"></script> |
7 |
<script type="text/javascript"> |
<script type="text/javascript" src="koha.js"></script> |
8 |
|
|
9 |
// Set this to something unique to this client |
<link rel="stylesheet" type="text/css" href="koha.css"> |
|
|
|
|
function process(data) { |
|
|
console.info('process', data); |
|
|
$('#test').append( data ); |
|
|
}; |
|
|
|
|
|
$(document).ready( function() { |
|
|
|
|
|
var channel = 'test'; |
|
|
|
|
|
Meteor.hostid = '409897502705'; |
|
|
|
|
|
// Our Meteor server is on the data. subdomain |
|
|
Meteor.host = 'data.' + location.hostname; |
|
|
Meteor.port = 4670; |
|
|
|
|
|
// Call the test() function when data arrives |
|
|
Meteor.registerEventCallback("process", process ); |
|
|
|
|
|
console.info('Meteor connect', channel, Meteor.status ); |
|
|
|
|
|
// Join the demo channel and get last five events, then stream |
|
|
Meteor.joinChannel( channel, 5 ); |
|
|
Meteor.mode = 'stream'; |
|
|
|
|
|
// Start streaming! |
|
|
Meteor.connect(); |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
</script> |
|
10 |
</head> |
</head> |
11 |
|
|
12 |
<body> |
<body> |
16 |
</h1> |
</h1> |
17 |
|
|
18 |
<div id="test"> |
<div id="test"> |
19 |
Waiting for data... |
RFID reader not connected |
20 |
|
</div> |
21 |
|
<div id="koha" style="border: 3px dashed #888"> |
22 |
|
Item description from <a href="http://koha.ffzg.hr/">Koha</a> |
23 |
</div> |
</div> |
24 |
|
|
25 |
</body> |
</body> |