329
| <![CDATA[<script type="text/javascript" language="javascript" >
jQuery(document).ready(function(){
function fill_datatable(filter_uf = '',filter_municipio = '',filter_inep = '',filter_escola = '',filter_ano = '')
{
var dataTable = jQuery('#data-table').DataTable({
"processing" : true,
"serverSide" : true,
"order" : [],
"searching" : false,
"ajax" : {
url:"http://educacaoconectada.mec.gov.br/modules/mod_datamapa/tmpl/default_fetch.php",
type:"POST",
data:{
filter_uf:filter_uf,filter_municipio:filter_municipio,filter_inep:filter_inep,filter_escola:filter_escola,filter_ano:filter_ano
}
},
"pageLength": 12,
"lengthMenu": [[12, 24, 48, -1], [12, 24, 48, "Todos"]],
"language": {
"sEmptyTable": "Nenhum registro encontrado",
"sInfo": "Mostrando de _START_ até _END_ de _TOTAL_ registros",
"sInfoEmpty": "Mostrando 0 até 0 de 0 registros",
"sInfoFiltered": "(Filtrados de _MAX_ registros)",
"sInfoPostFix": "",
"sInfoThousands": ".",
"sLengthMenu": "_MENU_ resultados por página",
"sLoadingRecords": "Carregando...",
"sProcessing": "Processando...",
"sZeroRecords": "Nenhum registro encontrado",
// "sSearch": "Pesquisar",
"oPaginate": {
"sNext": "Próximo",
"sPrevious": "Anterior",
"sFirst": "Primeiro",
"sLast": "Último"
},
"oAria": {
"sSortAscending": ": Ordenar colunas de forma ascendente",
"sSortDescending": ": Ordenar colunas de forma descendente"
}
}
});
}
if(jQuery('#filter_uf').val() == '' && jQuery('#filter_municipio').val() == '' && jQuery('#filter_inep').val() == ''){
jQuery('.table-responsive').hide();
}
jQuery('#filter').click(function(){
jQuery('.table-responsive').show();
if(jQuery('#filter_uf').val() != '' && jQuery('#filter_municipio').val() != '' && jQuery('#filter_inep').val() != '' && jQuery('#filter_ano').val() != ''){
jQuery('#data-table').DataTable().destroy();
fill_datatable(jQuery('#filter_uf').val(),jQuery('#filter_municipio').val(),jQuery('#filter_inep').val(),jQuery('#filter_escola').val(),jQuery('#filter_ano').val());
//console.log('if 1');
}else if(jQuery('#filter_uf').val() != '' && jQuery('#filter_municipio').val() != '' && jQuery('#filter_inep').val() != ''){
jQuery('#data-table').DataTable().destroy();
fill_datatable(jQuery('#filter_uf').val(),jQuery('#filter_municipio').val(),jQuery('#filter_inep').val(),jQuery('#filter_escola').val(),jQuery('#filter_ano').val());
//console.log('if 2');
}else if(jQuery('#filter_uf').val() != '' && jQuery('#filter_municipio').val() != ''){
jQuery('#data-table').DataTable().destroy();
fill_datatable(jQuery('#filter_uf').val(),jQuery('#filter_municipio').val(),jQuery('#filter_inep').val(),jQuery('#filter_escola').val(),jQuery('#filter_ano').val());
//console.log('if 3');
}else if(jQuery('#filter_uf').val() != '' && jQuery('#filter_inep').val() != ''){
jQuery('#data-table').DataTable().destroy();
fill_datatable(jQuery('#filter_uf').val(),jQuery('#filter_municipio').val(),jQuery('#filter_inep').val(),jQuery('#filter_escola').val(),jQuery('#filter_ano').val());
//console.log('if 4');
}else if(jQuery('#filter_uf').val() != ''){
jQuery('#data-table').DataTable().destroy();
fill_datatable(jQuery('#filter_uf').val(),jQuery('#filter_municipio').val(),jQuery('#filter_inep').val(),jQuery('#filter_escola').val(),jQuery('#filter_ano').val());
//console.log('if 5');
}else if(jQuery('#filter_inep').val() != ''){
jQuery('#data-table').DataTable().destroy();
fill_datatable(jQuery('#filter_uf').val(),jQuery('#filter_municipio').val(),jQuery('#filter_inep').val(),jQuery('#filter_escola').val(),jQuery('#filter_ano').val());
//console.log('if 6');
}else{
alert('Selecione o estado no mapa ou entre com o código INEP da escola.');
jQuery('.table-responsive').hide();
//jQuery('#data-table').DataTable().destroy();
//fill_datatable();
jQuery('#filter_uf').focus();
}
});
jQuery('#filter_uf').change(function(){
jQuery('#filter_inep').val('');
jQuery('#filter_municipio').focus();
jQuery('#filter_municipio').val(jQuery('#filter_municipio option:first').val());
jQuery('#filter_municipio option').each(function() {
if(jQuery(this).attr('id') != jQuery('#filter_uf').val() && jQuery(this).val() != ''){
jQuery(this).hide();
}
if(jQuery(this).attr('id') == jQuery('#filter_uf').val()){
jQuery(this).show();
}
});
});
jQuery( ".estados div" ).each(function( index ) {
jQuery(this).click(function(){
jQuery('#filter_escola').val('');
jQuery('#filter_inep').val('');
jQuery('.table-responsive').show();
var filter_uf = jQuery( this ).text();
var filter_municipio = '';
var filter_inep = '';
var filter_escola = '';
var filter_ano = '';
jQuery('#filter_municipio').val(jQuery('#filter_municipio option:first').val());
if(filter_uf != ''){
jQuery('#data-table').DataTable().destroy();
fill_datatable(filter_uf,filter_municipio,filter_inep,filter_escola,filter_ano);
jQuery('#filter_uf option').each(function() {
if(jQuery(this).val() == filter_uf){
jQuery('#filter_municipio').focus();
jQuery('#filter_municipio').val(jQuery('#filter_municipio option:first').val());
jQuery('#filter_municipio option').each(function() {
if(jQuery(this).attr('id') != filter_uf && jQuery(this).val() != ''){
jQuery(this).hide();
}
if(jQuery(this).attr('id') == filter_uf){
jQuery(this).show();
}
});
jQuery(this).attr('selected','selected');
}else{
jQuery(this).removeAttr('selected');
}
});
}
});
});
jQuery('#filter_inep').click(function(){
jQuery('#filter_escola').val('');
});
jQuery('#filter_escola').click(function(){
jQuery('#filter_inep').val('');
});
});
</script>]]>
|
502
| <![CDATA[<script type="text/javascript">
function showUrl() {
var urlSite = document.URL;
var titleSite = document.title;
document.getElementById("novo-btn-wpp").href = 'whatsapp://send?text='+urlSite;
document.getElementById("novo-btn-face").href = 'https://www.facebook.com/sharer/sharer.php?u='+urlSite;
document.getElementById("novo-btn-gplus").href = 'https://plus.google.com/share?url='+urlSite;
document.getElementById("novo-btn-twitter").href = 'https://twitter.com/intent/tweet?text='+titleSite+'&url='+urlSite+'&via=mec_comunicacao';
}
showUrl();
function popupwindow(url, title, w, h) {
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}
</script>]]>
|