You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

93 lines
2.4 KiB

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bobinoscope</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="/css/view.css"/>
</head>
<body>
<div id="idMain" style="width:400px; margin: auto">
<div id="idViewLoading">
<img src='/img/common/294.GIF'/>
</div>
<div id="idViewContainer">
</div>
</div>
</body>
<!-- Latest compiled and minified JQuery -->
<script src="/js/jquery-1.11.2.min.js"></script>
<!-- Latest compiled and minified javaScript bootstrap-->
<script src="/js/bootstrap.min.js"></script>
<!-- Getting the Socket.IO Client -->
<script src="/js/socket.io-1.3.4.js"></script>
</html>
<script type="text/javascript">
var socket = io('http://<%= serverIpAddress %>:3000');
socket.on('connect', function() {
console.log("connect")
})
socket.on('boothState', function (data) {
BOB_getBooths();
});
$(document).ready(function() {
BOB_getBooths();
if( $(window).width() < 500 ) {
$('#idMain').css('width' ,'100%');
}
})
var BOB_var_lastBooth = "0";
function BOB_getBooths() {
var boothList = $(".classBoothItem");
var jqBoothContainer = $('#idViewContainer');
$.get('/booth/list/'+BOB_var_lastBooth, function(pResponse) {
if( pResponse.inProgress > 0 ) {
$('#idViewLoading').fadeIn();
} else {
$('#idViewLoading').fadeOut();
}
pResponse.booths.forEach(function(pBoothName) {
var jqImg = $('<img>');
jqImg.css('width', '100%');
jqImg.css('opacity', '0');
jqImg.css('transition', 'opacity 1s');
jqImg.data('booth', pBoothName);
jqImg.attr('src', "/img/final_ld/"+pBoothName);
jqImg.addClass('classBoothItem');
jqImg.on('click', function() {
jqImg.css('opacity', '0.4');
if( confirm("Télécharger ?") ) {
window.open("/download/final/hd/"+pBoothName, "_blank");
}
jqImg.css('opacity', '1');
})
jqImg.on('load', function() {
jqImg.css('opacity', '1');
})
if( pBoothName.localeCompare(BOB_var_lastBooth) > 0 ) {
BOB_var_lastBooth = pBoothName;
}
jqBoothContainer.prepend(jqImg);
})
})
console.log('-----------------');
}
</script>