45
| <![CDATA[<script type="text/javascript">
jQuery(function($) {
SqueezeBox.initialize({});
SqueezeBox.assign($('a.modal').get(), {
parse: 'rel'
});
});
window.jModalClose = function () {
SqueezeBox.close();
};
// Add extra modal close functionality for tinyMCE-based editors
document.onreadystatechange = function () {
if (document.readyState == 'interactive' && typeof tinyMCE != 'undefined' && tinyMCE)
{
if (typeof window.jModalClose_no_tinyMCE === 'undefined')
{
window.jModalClose_no_tinyMCE = typeof(jModalClose) == 'function' ? jModalClose : false;
jModalClose = function () {
if (window.jModalClose_no_tinyMCE) window.jModalClose_no_tinyMCE.apply(this, arguments);
tinyMCE.activeEditor.windowManager.close();
};
}
if (typeof window.SqueezeBoxClose_no_tinyMCE === 'undefined')
{
if (typeof(SqueezeBox) == 'undefined') SqueezeBox = {};
window.SqueezeBoxClose_no_tinyMCE = typeof(SqueezeBox.close) == 'function' ? SqueezeBox.close : false;
SqueezeBox.close = function () {
if (window.SqueezeBoxClose_no_tinyMCE) window.SqueezeBoxClose_no_tinyMCE.apply(this, arguments);
tinyMCE.activeEditor.windowManager.close();
};
}
}
};
JCEMediaBox.init({popup:{width:"",height:"",legacy:0,lightbox:0,shadowbox:0,resize:1,icons:1,overlay:1,overlayopacity:0.8,overlaycolor:"#000000",fadespeed:500,scalespeed:500,hideobjects:0,scrolling:"fixed",close:2,labels:{'close':'Fechar','next':'Próximo','previous':'Anterior','cancel':'Cancelar','numbers':'{$current} de {$total}'},cookie_expiry:"",google_viewer:0},tooltip:{className:"tooltip",opacity:0.8,speed:150,position:"br",offsets:{x: 16, y: 16}},base:"/",imgpath:"plugins/system/jcemediabox/img",theme:"standard",themecustom:"",themepath:"plugins/system/jcemediabox/themes",mediafallback:0,mediaselector:"audio,video"});
jQuery(function($){ initTooltips(); $("body").on("subform-row-add", initTooltips); function initTooltips (event, container) { container = container || document;$(container).find(".hasTooltip").tooltip({"html": true,"container": "body"});} });
</script>]]>
|
408
| <![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>]]>
|