mirror of https://github.com/interlegis/sapl.git
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.
230 lines
6.7 KiB
230 lines
6.7 KiB
{% extends "sessao/sessaoplenaria_detail.html" %}
|
|
{% load i18n %}
|
|
{% load staticfiles %}
|
|
|
|
{% block detail_content %}
|
|
<audio type="hidden" id="audio" src="{% static 'audio/ring.mp3' %}"> </audio>
|
|
|
|
<ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-2">
|
|
<!-- <li><a href="{% url 'painel_principal' object.pk %}">Iniciar painel presidente</a></li> -->
|
|
<li><a href="{% url 'painel_principal' object.pk %}">Iniciar painel completo</a></li>
|
|
<!-- <li><a href="{% url 'painel_mensagem' %}">Iniciar painel mensagem</a></li>
|
|
<li><a href="{% url 'painel_parlamentares' %}">Iniciar painel parlamentares</a></li>
|
|
<li><a href="{% url 'painel_votacao' %}">Iniciar painel votação</a></li> -->
|
|
<li><a href="{% url 'painel_controlador' %}">Controlador Painel</a></li>
|
|
</ul>
|
|
<br />
|
|
<h5>Operação do Painel Eletrônico</h5>
|
|
<h8><span id="relogio"></span></h8>
|
|
<br /><br />
|
|
<ul class="small-block-grid-1 medium-block-grid-1 large-block-grid-1">
|
|
<li><h5>Cronômetro do Discurso</h5></li>
|
|
</ul>
|
|
|
|
<ul class="small-block-grid-1 medium-block-grid-1 large-block-grid-1">
|
|
<li><input size="2" id="discurso" name="discurso" value="" readyonly="true"></li>
|
|
</ul>
|
|
|
|
<ul class="small-block-grid-2 medium-block-grid-2 large-block-grid-2">
|
|
<li><button type="button" id="discursoStart">Iniciar</button></li>
|
|
<li><button type="button" id="discursoReset">Reiniciar</button></li>
|
|
</ul>
|
|
|
|
<ul class="small-block-grid-1 medium-block-grid-1 large-block-grid-1">
|
|
<li><h5>Cronômetro do Aparte</h5></li>
|
|
</ul>
|
|
|
|
<ul class="small-block-grid-1 medium-block-grid-1 large-block-grid-1">
|
|
<li><input size="2" id="aparte" name="aparte" value="" readyonly="true"></li>
|
|
</ul>
|
|
|
|
<ul class="small-block-grid-2 medium-block-grid-2 large-block-grid-2">
|
|
<li><button type="button" id="aparteStart">Iniciar</button></li>
|
|
<li><button type="button" id="aparteReset">Reiniciar</button></li>
|
|
</ul>
|
|
|
|
<ul class="small-block-grid-1 medium-block-grid-1 large-block-grid-1">
|
|
<li><h5>Cronômetro da Questão de Ordem </h5></li>
|
|
</ul>
|
|
|
|
<ul class="small-block-grid-1 medium-block-grid-1 large-block-grid-1">
|
|
<li><input size="2" id="ordem" name="ordem" value="" readyonly="true"></li>
|
|
</ul>
|
|
|
|
<ul class="small-block-grid-2 medium-block-grid-2 large-block-grid-2">
|
|
<li><button type="button" id="ordemStart">Iniciar</button></li>
|
|
<li><button type="button" id="ordemReset">Reiniciar</button></li>
|
|
</ul>
|
|
|
|
{% endblock detail_content %}
|
|
|
|
{% block foot_js %}
|
|
<script language="JavaScript">
|
|
$(function() {
|
|
|
|
function checkTime(i) {
|
|
if (i<10) {i = "0" + i};
|
|
return i;
|
|
}
|
|
|
|
function startTime() {
|
|
var today=new Date();
|
|
var h=today.getHours();
|
|
var m=today.getMinutes();
|
|
var s=today.getSeconds();
|
|
m = checkTime(m);
|
|
s = checkTime(s);
|
|
$("#relogio").text(h+":"+m+":"+s)
|
|
var t = setTimeout(function(){
|
|
startTime()
|
|
},500);
|
|
}
|
|
|
|
startTime();
|
|
|
|
var audioAlertFinish = document.getElementById("audio");
|
|
|
|
$('#discurso').prop('disabled', true);
|
|
$('#aparte').prop('disabled', true);
|
|
$('#ordem').prop('disabled', true);
|
|
|
|
$('#discurso').runner({
|
|
autostart: false,
|
|
countdown: true,
|
|
startAt: 60 * 5 * 1000,
|
|
stopAt: 0,
|
|
milliseconds: false
|
|
}).on('runnerFinish', function(eventObject, info){
|
|
audioAlertFinish.play();
|
|
});
|
|
|
|
$('#discursoStart').click(function() {
|
|
|
|
if ($('#discursoStart').text() == 'Iniciar'){
|
|
|
|
$.get('/painel/cronometro', { tipo: 'discurso', action: 'start' } );
|
|
|
|
$('#discursoReset').hide();
|
|
$('#discurso').runner('start');
|
|
$('#discursoStart').text('Parar');
|
|
$('#aparteStart').prop('disabled', true);
|
|
$('#aparteReset').prop('disabled', true);
|
|
$('#ordemStart').prop('disabled', true);
|
|
$('#ordemReset').prop('disabled', true);
|
|
|
|
} else {
|
|
|
|
$.get('/painel/cronometro', { tipo: 'discurso', action: 'stop' } );
|
|
|
|
$('#discursoReset').show();
|
|
$('#discurso').runner('stop');
|
|
$('#discursoStart').text('Iniciar');
|
|
$('#aparteStart').prop('disabled', false);
|
|
$('#aparteReset').prop('disabled', false);
|
|
$('#ordemStart').prop('disabled', false);
|
|
$('#ordemReset').prop('disabled', false);
|
|
}
|
|
});
|
|
|
|
$('#discursoReset').click(function() {
|
|
|
|
$.get('/painel/cronometro', { tipo: 'discurso', action: 'reset' } );
|
|
|
|
$('#discurso').runner('stop');
|
|
$('#discurso').runner('reset');
|
|
});
|
|
|
|
$('#aparte').runner({
|
|
autostart: false,
|
|
countdown: true,
|
|
startAt: 60 * 3 * 1000,
|
|
stopAt: 0,
|
|
milliseconds: false
|
|
}).on('runnerFinish', function(eventObject, info){
|
|
audioAlertFinish.play();
|
|
});
|
|
|
|
$('#aparteStart').click(function(){
|
|
if ($('#aparteStart').text() == 'Iniciar') {
|
|
|
|
$.get('/painel/cronometro', { tipo: 'aparte', action: 'start' } );
|
|
|
|
$('#aparteReset').hide();
|
|
$('#aparte').runner('start');
|
|
$('#aparteStart').text('Parar');
|
|
$('#discursoStart').prop('disabled', true);
|
|
$('#discursoReset').prop('disabled', true);
|
|
$('#ordemStart').prop('disabled', true);
|
|
$('#ordemReset').prop('disabled', true);
|
|
|
|
} else {
|
|
|
|
$.get('/painel/cronometro', { tipo: 'aparte', action: 'stop' } );
|
|
|
|
$('#aparteReset').show();
|
|
$('#aparte').runner('stop');
|
|
$('#aparteStart').text('Iniciar');
|
|
$('#discursoStart').prop('disabled', false);
|
|
$('#discursoReset').prop('disabled', false);
|
|
$('#ordemStart').prop('disabled', false);
|
|
$('#ordemReset').prop('disabled', false);
|
|
}
|
|
});
|
|
|
|
$('#aparteReset').click(function() {
|
|
|
|
$.get('/painel/cronometro', { tipo: 'aparte', action: 'reset' } );
|
|
|
|
$('#aparte').runner('stop');
|
|
$('#aparte').runner('reset');
|
|
});
|
|
|
|
$('#ordem').runner({
|
|
autostart: false,
|
|
countdown: true,
|
|
startAt: 60 * 2 * 1000,
|
|
stopAt: 0,
|
|
milliseconds: false
|
|
}).on('runnerFinish', function(eventObject, info){
|
|
audioAlertFinish.play();
|
|
});
|
|
|
|
$('#ordemStart').click(function() {
|
|
if ($('#ordemStart').text() == 'Iniciar') {
|
|
|
|
$.get('/painel/cronometro', { tipo: 'ordem', action: 'start' } );
|
|
|
|
$('#ordemReset').hide();
|
|
$('#ordem').runner('start');
|
|
$('#ordemStart').text('Parar');
|
|
$('#discursoStart').prop('disabled', true);
|
|
$('#discursoReset').prop('disabled', true);
|
|
$('#aparteStart').prop('disabled', true);
|
|
$('#aparteReset').prop('disabled', true);
|
|
|
|
} else {
|
|
|
|
$.get('/painel/cronometro', { tipo: 'ordem', action: 'stop' } );
|
|
|
|
$('#ordemReset').show();
|
|
$('#ordem').runner('stop');
|
|
$('#ordemStart').text('Iniciar');
|
|
$('#discursoStart').prop('disabled', false);
|
|
$('#discursoReset').prop('disabled', false);
|
|
$('#aparteStart').prop('disabled', false);
|
|
$('#aparteReset').prop('disabled', false);
|
|
}
|
|
});
|
|
|
|
$('#ordemReset').click(function() {
|
|
|
|
$.get('/painel/cronometro', { tipo: 'ordem', action: 'reset' } );
|
|
|
|
$('#ordem').runner('stop');
|
|
$('#ordem').runner('reset');
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|