|
|
@ -22,9 +22,9 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div id="idViewCountdown" style="font-size:15em; display:none"></div> |
|
|
<div id="idViewCountdown" style="font-size:15em; display:none"></div> |
|
|
</div> |
|
|
</div> |
|
|
<div style="font-size:8em; height:600px; display:none"> |
|
|
|
|
|
|
|
|
<div id="idViewDoIt" style="font-size:8em; height:600px; display:none"> |
|
|
Faites<br/> |
|
|
Faites<br/> |
|
|
<span style="font-size:2em">le chat</span> |
|
|
|
|
|
|
|
|
<span id="idViewDoIt-theme" style="font-size:2em">le chat</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
@ -70,23 +70,26 @@ socket.on('boothClick', function(pData) { |
|
|
BOB_runBooth(); |
|
|
BOB_runBooth(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
BOB_var_context = { |
|
|
|
|
|
|
|
|
var BOB_var_context = { |
|
|
boothOnGoing : false, |
|
|
boothOnGoing : false, |
|
|
initTimer : 3, |
|
|
|
|
|
|
|
|
initTimer : 6, |
|
|
onGoingTimer : 0, |
|
|
onGoingTimer : 0, |
|
|
boothId : null, |
|
|
boothId : null, |
|
|
pictureId : 0 |
|
|
pictureId : 0 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
BOB_var_themes = [ |
|
|
|
|
|
"le chat", |
|
|
|
|
|
"le cuir moustache", |
|
|
|
|
|
"le roi", |
|
|
|
|
|
"le bouffon", |
|
|
|
|
|
"le moussailon", |
|
|
|
|
|
"le geek", |
|
|
|
|
|
"l'amoureux", |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
var BOB_var_themes = { |
|
|
|
|
|
selectedId : 0, |
|
|
|
|
|
list : [ |
|
|
|
|
|
"le chat", |
|
|
|
|
|
"le cuir moustache", |
|
|
|
|
|
"le roi", |
|
|
|
|
|
"le bouffon", |
|
|
|
|
|
"le moussailon", |
|
|
|
|
|
"le geek", |
|
|
|
|
|
"l'amoureux", |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$(document).ready(function() { |
|
|
$(document).ready(function() { |
|
|
$('#idBtnClick').click(function() { |
|
|
$('#idBtnClick').click(function() { |
|
|
@ -95,30 +98,38 @@ $(document).ready(function() { |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
function BOB_runBooth() { |
|
|
function BOB_runBooth() { |
|
|
|
|
|
|
|
|
if( BOB_var_context.boothOnGoing === false ) { |
|
|
if( BOB_var_context.boothOnGoing === false ) { |
|
|
var currentDate = new Date(); |
|
|
var currentDate = new Date(); |
|
|
BOB_var_context.boothOnGoing = true; |
|
|
BOB_var_context.boothOnGoing = true; |
|
|
BOB_var_context.boothId = currentDate.getTime(); |
|
|
BOB_var_context.boothId = currentDate.getTime(); |
|
|
BOB_var_context.pictureId = 0; |
|
|
BOB_var_context.pictureId = 0; |
|
|
BOB_var_context.onGoingTimer = BOB_var_context.initTimer; |
|
|
BOB_var_context.onGoingTimer = BOB_var_context.initTimer; |
|
|
|
|
|
|
|
|
$('#idViewTrigger').fadeOut(500, function() { |
|
|
$('#idViewTrigger').fadeOut(500, function() { |
|
|
BOB_countdown(); |
|
|
BOB_countdown(); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function BOB_countdown() { |
|
|
function BOB_countdown() { |
|
|
$('#idViewCountdown').fadeIn(); |
|
|
$('#idViewCountdown').fadeIn(); |
|
|
$('#idViewCountdown').html(BOB_var_context.onGoingTimer); |
|
|
$('#idViewCountdown').html(BOB_var_context.onGoingTimer); |
|
|
|
|
|
// |
|
|
|
|
|
if( BOB_var_context.onGoingTimer > 5 ) { |
|
|
|
|
|
// $('#idViewDoIt').show(); |
|
|
|
|
|
// $('#idViewDoIt-theme').hide(); |
|
|
|
|
|
} else if( BOB_var_context.onGoingTimer > 2 ) { |
|
|
|
|
|
// $('#idViewDoIt-theme').html( BOB_var_themes.list[BOB_var_themes.selectedId] ); |
|
|
|
|
|
// $('#idViewDoIt-theme').show(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if( BOB_var_context.onGoingTimer > 0 ) { |
|
|
if( BOB_var_context.onGoingTimer > 0 ) { |
|
|
setTimeout(function() { |
|
|
setTimeout(function() { |
|
|
BOB_var_context.onGoingTimer -= 1; |
|
|
BOB_var_context.onGoingTimer -= 1; |
|
|
BOB_countdown(); |
|
|
BOB_countdown(); |
|
|
}, 1000) |
|
|
}, 1000) |
|
|
} else { |
|
|
} else { |
|
|
$('#idViewCountdown').html("Smile :-)"); |
|
|
|
|
|
|
|
|
$('#idViewCountdown').html("Smile"); |
|
|
BOB_takeThe1Pictures(); |
|
|
BOB_takeThe1Pictures(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -139,9 +150,21 @@ function BOB_displayPictPreview(pBoothId, pPictureId, pCallback) { |
|
|
|
|
|
|
|
|
function BOB_takeThe1Pictures() { |
|
|
function BOB_takeThe1Pictures() { |
|
|
$.get('/dslr/takepicture/'+BOB_var_context.boothId+'/'+BOB_var_context.pictureId, function(pResponse) { |
|
|
$.get('/dslr/takepicture/'+BOB_var_context.boothId+'/'+BOB_var_context.pictureId, function(pResponse) { |
|
|
console.log(pResponse); |
|
|
|
|
|
|
|
|
if( pResponse.error ) { |
|
|
|
|
|
if( confirm(pResponse.error) ) { |
|
|
|
|
|
BOB_var_context.boothOnGoing = false; |
|
|
|
|
|
$('#idViewCountdown').fadeOut(500, function() { |
|
|
|
|
|
$('#idViewTrigger').fadeIn(); |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// $('#idViewDoIt').hide(); |
|
|
|
|
|
// $('#idViewDoIt-theme').hide(); |
|
|
|
|
|
|
|
|
|
|
|
// BOB_var_themes.selectedId++; |
|
|
|
|
|
|
|
|
BOB_displayPictPreview(BOB_var_context.boothId, BOB_var_context.pictureId, function() { |
|
|
|
|
|
|
|
|
// BOB_displayPictPreview(BOB_var_context.boothId, BOB_var_context.pictureId, function() { |
|
|
BOB_var_context.pictureId += 1; |
|
|
BOB_var_context.pictureId += 1; |
|
|
if( BOB_var_context.pictureId < 4 ) { |
|
|
if( BOB_var_context.pictureId < 4 ) { |
|
|
BOB_var_context.onGoingTimer = BOB_var_context.initTimer; |
|
|
BOB_var_context.onGoingTimer = BOB_var_context.initTimer; |
|
|
@ -153,7 +176,7 @@ function BOB_takeThe1Pictures() { |
|
|
$('#idViewTrigger').fadeIn(); |
|
|
$('#idViewTrigger').fadeIn(); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}) |
|
|
|
|
|
|
|
|
// }) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|