510
| <![CDATA[<script type="text/javascript">
google.charts.load("current", {
packages: ['corechart', 'bar']
});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
["Element", "Quantidade", {
role: "style"
}],
['RECLAMAÇÕES', 2, '#15B063'],
['DÚVIDAS', 1, '#F1491C'],
['DENÚNCIAS', 0, '#A349A4'],
['SUGESTÕES', 0, '#0DA5AA'],
['ELOGIOS', 0, '#C52259'],
['URGÊNCIAS', 0, '#FF7F00'],
['CRÍTICAS', 0, '#2C93DE'],
['SERVIÇOS', 0, '#939393'],
['', , ''],
]);
var view = new google.visualization.DataView(data);
// Com decimais //decimalSymbol: ',', groupingSymbol: '.'
var formatter = new google.visualization.NumberFormat({
pattern: '#',
groupingSymbol: '.'
});
formatter.format(data, 1);
view.setColumns([0, 1,
{
calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation"
},
2
]);
var options = {
title: "",
height: 220,
chartArea: {
width: '85%'
},
animation: {
"startup": true,
duration: 2000,
easing: 'out'
},
legend: {
position: "none",
},
viewWindow: {
min: [7, 30, 0],
max: [17, 30, 0]
},
hAxis: {
title: '',
minValue: 0
},
textStyle: {
bold: true,
fontSize: 12,
color: '#FFFFFF'
},
};
var chart = new google.visualization.ColumnChart(document.getElementById("chart_div"));
chart.draw(data, options);
}
</script>]]>
|
587
| <![CDATA[<script>
$(function() {
var nav = $('#menuOuvidoria');
$(window).scroll(function() {
if ($(this).scrollTop() > 150) {
nav.addClass("menu-fixo");
$('body').css('padding-top', 70);
} else {
nav.removeClass("menu-fixo");
$('body').css('padding-top', 0);
}
});
});
</script>]]>
|
602
| <![CDATA[<script>
function rolar_para(botaoContatos) {
var targetOffset = $(botaoContatos).offset().top;
$('html, body').animate({
scrollTop: targetOffset - 100
}, 2000);
}
$(document).ready(function() {
$(".formsend").submit(function (e) {
e.preventDefault();
var form = $(this);
var load = $(".ajax_load");
var flashClass = "ajax_response";
var flash = $("." + flashClass);
var btnsubmit = form.find('button[type=submit]');
form.ajaxSubmit({
"url": form.attr("action"),
"type": "POST",
"dataType": "json",
"beforeSend": function () {
btnsubmit.prop('disabled', true);
load.fadeIn(200).css("display", "flex");
},
"success": function (data) {
console.log(data);
btnsubmit.removeAttr('disabled');
Swal.fire(
{ text: data.msg,
title: data.title,
confirmButtonText: data.btn,
type: data.tipo
}).then(() => {
if (data.retorno != '') {
form.trigger("reset");
if (data.retorno == 'R') {
window.location.reload();
} else {
window.location.href=data.retorno;
}
}
});
},
"complete": function () {
load.fadeOut(200);
btnsubmit.removeAttr('disabled');
if (form.data("reset") === true) {
form.trigger("reset");
}
}
});
});
var uf = $("#UfId").val();
optionsCidades(uf, '#MunicipioId');
$("#UfId").change(function() {
var uf = $(this).val();
optionsCidades(uf, '#MunicipioId');
})
function optionsCidades(u, sel, muni) {
var uf = u;
var select = sel;
var municipio = muni;
$.ajax({
type: "POST",
url: 'data_cidades.php',
data: {
uf: uf,
municipio: municipio
},
beforeSend: function() {
$(select).html('<option disabled value="" selected hidden>Carregando...</option>');
},
success: function(data) {
$(select).html(data);
},
error: function() {
alert('erro optionsCidades');
},
complete: function() {
//$('.load').hide();
}
});
}
$("#data").mask("99/99/9999");
$("#fone").mask("(99) 99999-9999");
$("#fixo").click(function(e) {
$("#fone").mask("(99) 9999-9999");
});
$("#sim").click(function(e) {
$("#nome").removeAttr('required');
$("#sexo").removeAttr('required');
$("#grau").removeAttr('required');
$("#data").removeAttr('required');
$("#UfId").removeAttr('required');
$("#MunicipioId").removeAttr('required');
$("#asterisco").hide();
$("#_sexo").hide();
$("#_grau").hide();
$("#_data").hide();
$("#_uf").hide();
$("#_municipio").hide();
});
$("#nao").click(function(e) {
$("#nome").attr('required');
$("#sexo").attr('required');
$("#grau").attr('required');
$("#data").attr('required');
$("#UfId").attr('required');
$("#MunicipioId").attr('required');
$("#asterisco").show();
$("#_sexo").show();
$("#_grau").show();
$("#_data").show();
$("#_uf").show();
$("#_municipio").show();
});
$("#celular").click(function(e) {
$("#fone").mask("(99) 99999-9999");
});
});
var toggle = true;
$(".sidebar-icon").click(function() {
if (toggle) {
$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
$("#menu span").css({
"position": "absolute"
});
} else {
$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
setTimeout(function() {
$("#menu span").css({
"position": "relative"
});
}, 400);
}
toggle = !toggle;
});
</script>]]>
|
773
| <![CDATA[<script>
var doughnutData = [{
value: 0,
color: "#e74c3c",
label: "Não respondidos"
},
{
value: 3,
color: "#27ae60",
label: "Respondidos"
},
];
new Chart(document.getElementById("doughnut").getContext("2d")).Doughnut(doughnutData);
var doughnutDataS = [
{
value: 2,
color: "#27ae60",
label: "NÃO INFORMADO",
},
{
value: 1,
color: "#f39c12",
label: "MASCULINO",
},
];
new Chart(document.getElementById("doughnutS").getContext("2d")).Doughnut(doughnutDataS);
var doughnutDataG = [
{
value: 2,
color: "#27ae60",
label: "NÃO INFORMADO",
},
{
value: 1,
color: "#f39c12",
label: "ANALFABETO, INCLUSIVE O QUE, EMBORA TENHA RECEBIDO INSTRU��O, N�O SE ALFABETIZOU.",
},
];
new Chart(document.getElementById("doughnutG").getContext("2d")).Doughnut(doughnutDataG);
var doughnutDataI = [
{
value: 1,
color: "#27ae60",
label: "FAIXA 2 - DE 21 A 40 ANOS ",
},
{
value: 2,
color: "#f39c12",
label: "FAIXA 4 - NÃO INFORMADO",
},
];
new Chart(document.getElementById("doughnutI").getContext("2d")).Doughnut(doughnutDataI);
</script>]]>
|
859
| <![CDATA[<script>
$("#assunto").change(function() {
var texto = $(this).find('option:selected').data('texto');
var cor = $(this).find('option:selected').data('cor');
var style = '';
$("#detalheassundo").empty();
if (texto !== '') {
if (cor !== '') {
style = 'background-color:' + cor + '; color:#FFF;';
}
$("#detalheassundo").html('<div class="alert alert-success" style="' + style + '" role="alert" ><i class="fa fa-lightbulb-o"></i> <i>' + texto + ' </i> </div>');
}
})
</script>]]>
|