2012-12-28 22:17:47 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Bootstrap 101 Template</title>
|
|
|
|
<!-- Bootstrap -->
|
|
|
|
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
|
2012-12-28 23:04:06 +00:00
|
|
|
<link href="css/style.css" rel="stylesheet" media="screen">
|
2012-12-28 22:17:47 +00:00
|
|
|
<style type="text/css">
|
|
|
|
body { margin: 20px; }
|
|
|
|
.kasten {
|
|
|
|
display:block;
|
|
|
|
background-color: green;
|
|
|
|
width: 30%;
|
|
|
|
height: 100px;
|
|
|
|
padding: 10px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script src="js/jquery-1.8.3.min.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
2012-12-28 23:04:06 +00:00
|
|
|
<div class="container left">
|
|
|
|
<div class="row">
|
|
|
|
<div class="span3">
|
|
|
|
<div class="btn-group wabe-1-1-red" data-channel="/2/multitoggle/1/1">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-1-1-green" data-channel="/2/multitoggle/2/1">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-1-1-blue" data-channel="/2/multitoggle/1/2">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="span3 spansmall">
|
|
|
|
<div class="btn-group wabe-2-1-red" data-channel="/2/multitoggle/1/16">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="span3">
|
|
|
|
<div class="btn-group wabe-3-1-red" data-channel="/2/multitoggle/3/1">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-3-1-green" data-channel="/2/multitoggle/4/1">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-3-1-blue" data-channel="/2/multitoggle/3/2">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="span3">
|
|
|
|
<div class="btn-group wabe-4-1-red" data-channel="/2/multitoggle/5/1">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-green" data-channel="/2/multitoggle/6/1">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-blue" data-channel="/2/multitoggle/5/2">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2012-12-28 22:17:47 +00:00
|
|
|
<div class="row">
|
2012-12-28 23:04:06 +00:00
|
|
|
<div class="span3">
|
|
|
|
<div class="btn-group wabe-4-1-red" data-channel="/2/multitoggle/1/3">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-green" data-channel="/2/multitoggle/2/3">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-blue" data-channel="/2/multitoggle/1/4">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="span3 spansmall">
|
|
|
|
<div class="btn-group wabe-2-1-red" data-channel="/2/multitoggle/2/16">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
2012-12-28 22:17:47 +00:00
|
|
|
</div>
|
2012-12-28 23:04:06 +00:00
|
|
|
<div class="span3">
|
|
|
|
<div class="btn-group wabe-4-1-red" data-channel="/2/multitoggle/3/3">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-green" data-channel="/2/multitoggle/4/3">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-blue" data-channel="/2/multitoggle/3/4">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
2012-12-28 22:17:47 +00:00
|
|
|
</div>
|
2012-12-28 23:04:06 +00:00
|
|
|
<div class="span3">
|
|
|
|
<div class="btn-group wabe-4-1-red" data-channel="/2/multitoggle/5/3">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-green" data-channel="/2/multitoggle/6/3">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-blue" data-channel="/2/multitoggle/5/4">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
2012-12-28 22:17:47 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2012-12-28 23:04:06 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="span3">
|
|
|
|
<div class="btn-group wabe-4-1-red" data-channel="/2/multitoggle/1/5">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-green" data-channel="/2/multitoggle/2/5">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-blue" data-channel="/2/multitoggle/1/6">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="span3 spansmall">
|
|
|
|
<div class="btn-group wabe-2-1-red" data-channel="/2/multitoggle/3/16">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="span3">
|
|
|
|
<div class="btn-group wabe-4-1-red" data-channel="/2/multitoggle/3/5">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-green" data-channel="/2/multitoggle/4/5">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-blue" data-channel="/2/multitoggle/3/6">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="span3">
|
|
|
|
<div class="btn-group wabe-4-1-red" data-channel="/2/multitoggle/5/5">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-green" data-channel="/2/multitoggle/6/5">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group wabe-4-1-blue" data-channel="/2/multitoggle/5/6">
|
|
|
|
<button class="btn btn-success">on</button>
|
|
|
|
<button class="btn btn-danger">off</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container right">
|
|
|
|
<div class="span2">
|
|
|
|
LED
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="container right">
|
|
|
|
<div class="span2">
|
|
|
|
<input type="range" name="right-slider" id="right-slider" min="0" max="100" value="0" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<br style="clear: both" />
|
|
|
|
|
|
|
|
<div class="container bottom">
|
|
|
|
<input type="range" name="bottom-slider" id="bottom-slider" min="0" max="100" value="0" />
|
|
|
|
</div>
|
|
|
|
|
2012-12-28 22:17:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
<script src="/socket.io/socket.io.js"></script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
2012-12-28 23:04:06 +00:00
|
|
|
var socket = io.connect('http://' + window.location.hostname + ":" + window.location.port);
|
2012-12-28 22:17:47 +00:00
|
|
|
socket.on('news', function (data) {
|
|
|
|
console.log(data);
|
|
|
|
//
|
|
|
|
//handleDMXData(data);
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).ready(function(evnt) {
|
|
|
|
|
2012-12-28 23:04:06 +00:00
|
|
|
$(document).delegate('.btn-success', 'click', function(event) {
|
|
|
|
var channel = $(this).parent().data('channel');
|
2012-12-28 22:17:47 +00:00
|
|
|
if(channel != null) {
|
2012-12-28 23:04:06 +00:00
|
|
|
socket.emit('oscmessage', { chan: channel, val: 1 });
|
2012-12-28 22:17:47 +00:00
|
|
|
|
|
|
|
}
|
2012-12-28 23:04:06 +00:00
|
|
|
});
|
2012-12-28 22:17:47 +00:00
|
|
|
|
2012-12-28 23:04:06 +00:00
|
|
|
$(document).delegate('.btn-danger', 'click', function(event) {
|
|
|
|
var channel = $(this).parent().data('channel');
|
|
|
|
if(channel != null) {
|
|
|
|
socket.emit('oscmessage', { chan: channel, val: 0 });
|
|
|
|
|
|
|
|
}
|
2012-12-28 22:17:47 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script src="js/bootstrap.min.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|