694
| <![CDATA[<script type="text/javascript">
var inputText;
var $matching = $();
// Delay function
var delay = (function(){
var timer = 0;
return function(callback, ms){
clearTimeout (timer);
timer = setTimeout(callback, ms);
};
});
$(function () {
var filterList = {
init: function () {
// MixItUp plugin
// http://mixitup.io
$('#portfoliolist').mixItUp({
selectors: {
target: '.list-group-item',
//filter: '.filter'
},
load: {
filter: '.todos'
}
});
}
};
// Run the show!
filterList.init();
});
/*
$("#frm-buscar").keyup(function(e){
// Delay function invoked to make sure user stopped typing
inputText = $("#frm-buscar").val().toLowerCase();
// Check to see if input field is empty
if ((inputText.length) > 0) {
/*
$( '.list-group-item').each(function() {
$this = $("this");
// add item to be filtered out if input text matches items inside the title
if($(this).find('.busca').text().toLowerCase().match(inputText)) {
$matching = $matching.add(this);
} else {
// removes any previously matched item
$matching = $matching.not(this);
}
});
if($( '.list-group-item').find('.busca').text().toLowerCase().match(inputText)) {
$matching = $matching.add(this);
} else {
// removes any previously matched item
$matching = $matching.not(this);
}
$("#portfoliolist").mixItUp('filter', $matching);
} else {
// resets the filter to show all item if input is empty
$("#portfoliolist").mixItUp('filter', '.todos');
}
});
*/
$(".portfolio").click(function(e){
var titulo = $(this).find('.text-title-in').text();
var telefone = $(this).find('.telefone').html();
var email = $(this).find('.email').html();
var chat = $(this).find('.chat').html();
$('#exampleModalCenter').find('.modal-title').text(titulo);
if (titulo != "Protocolo") {
$('#exampleModalCenter').find('.linha-telefone').hide();
$('#exampleModalCenter').find('.linha-email').hide();
$('#exampleModalCenter').find('.linha-chat').hide();
$('#exampleModalCenter').find('.linha-agencias').hide();
$('#exampleModalCenter').find('.linha-fiscalizacao').hide();
if (titulo == "Agências do Interior") {
$('#exampleModalCenter').find('.linha-agencias').show();
} else if (titulo == "Gerência de Fiscalização - GFIS") {
$('#exampleModalCenter').find('.linha-fiscalizacao').show();
} else if (titulo == "Serviços Cadastrais" || titulo == "IPVA" || titulo == "Débitos e Parcelamentos" || titulo == "ITCMD" || titulo == "NF-e Avulsa" || titulo == "Secretaria Executiva de Orçamento") {
$('#exampleModalCenter').find('.linha-telefone').show();
$('#exampleModalCenter').find('.linha-email').show();
$('#exampleModalCenter').find('.linha-chat').show();
$('#exampleModalCenter').find('.telefone').html(telefone);
$('#exampleModalCenter').find('.email').html(email);
$('#exampleModalCenter').find('.chat').html(chat);
} else {
$('#exampleModalCenter').find('.linha-telefone').show();
$('#exampleModalCenter').find('.linha-email').show();
$('#exampleModalCenter').find('.telefone').html(telefone);
$('#exampleModalCenter').find('.email').html(email);
}
$('#exampleModalCenter').modal('show');
}
});
function myFunction() {
// Declare variables
var input, filter, ul, li, a, i, txtValue;
input = document.getElementById('frm-buscar');
filter = input.value.toUpperCase();
ul = document.getElementById("portfoliolist");
li = ul.getElementsByTagName('li');
// Loop through all list items, and hide those who don't match the search query
for (i = 0; i < li.length; i++) {
a = li[i].getElementsByTagName("a")[0];
txtValue = a.textContent || a.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
li[i].style.display = "";
} else {
li[i].style.display = "none";
}
}
}
function protocolar(id,nome,sigla){
opcoesProcesso = $.parseJSON("{\"tipoCadastro\":\"\",\"jaCarregouApplet\":true,\"secretaria\":{\"id\":\"1\",\"cdGrupo\":\"PROTOCOLO\",\"unSigla\":\"014101\",\"sigla\":\"SEFAZ\",\"nome\":\"SECRETARIA DE ESTADO DA FAZENDA\"},\"assunto\":{\"id\":"+id+",\"assunto\":"+sigla+",\"nome\": \""+nome+"\"},\"solicitacao\":\"\"}");
location = "https://protocolovirtual.amazonas.am.gov.br/novoAgendamento.asp?assunto="+id;
}
function openModal(id){
$("#descricao_servico").html($("#"+id).val());
}
$('.list-group-item').popover({
trigger: 'hover'
})
function openCloseModal() {
}
$("[data-toggle=popover]").popover();
</script>]]>
|