231
| <![CDATA[<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-55997910-33');
</script>]]>
|
677
| <![CDATA[<script type="text/javascript">
$(document).ready(function(){
$('#ultimos_lancamentos').on('click', function(event){
event.preventDefault();
if(!$('#ultimos_lancamentos').is(':checked')) {
$('#ultimos_lancamentos').prop('checked', false)
$('#label_lancamentos').removeClass('font-weight-bold')
document.getElementById('filterForm').submit()
}
else {
console.log($(this))
$(this).prop('checked',true)
$('#mais_acessados').prop('checked', false)
$('#label_acessados').removeClass('font-weight-bold')
$('#check_lancamentos').prop('style', 'background-color: #1ab0c1;border-color: #1ab0c1;display:block')
var styleElem = document.head.appendChild(document.createElement("style"));
styleElem.innerHTML = "#check_lancamentos:after {display: block;}";
document.getElementById('filterForm').submit()
}
});
$('#mais_acessados').on('click', function(){
event.preventDefault();
if(!$('#mais_acessados').is(':checked')) {
$('#mais_acessados').prop('checked', false)
$('#label_acessados').removeClass('font-weight-bold')
document.getElementById('filterForm').submit()
}
else {
console.log($(this))
$(this).prop('checked','checked');
$('#ultimos_lancamentos').prop('checked', false)
$('#label_lancamentos').removeClass('font-weight-bold')
$('#check_acessados').prop('style', 'background-color: #1ab0c1;border-color: #1ab0c1;display:block')
var styleElem = document.head.appendChild(document.createElement("style"));
styleElem.innerHTML = "#check_acessados:after {display: block;}";
document.getElementById('filterForm').submit()
}
});
})
</script>]]>
|
1168
| <![CDATA[<script type="text/javascript">
$(document).ready(function(){
// Limpa o texto no input de busca quando o botão de x é apertado
let size_field = $('#search_input').val().length
if(size_field > 0) {
check_size_button();
}else {
check_size();
}
$(window).resize(function (){
let size_field = $('#search_input').val().length
if(size_field > 0) {
check_size_button();
}else {
check_size();
}
})
$('#clear-button').click(function (){
$('#clear-button').hide();
check_size();
})
// Ajusta o tamanho do atributo size de acordo com o cumprimento do texto digitado
function check_size_button(){
let search_input_count = $('#search_input_count');
search_input_count.text($("#search_input").val())
let input_size = Math.ceil((search_input_count.innerWidth() + 1)*0.12);
let max_input_size = Math.ceil(($('#outer-search-box').width())*0.12 - 9) - 4;
if (input_size > max_input_size) {
input_size = max_input_size
}
$('#search_input').css('text-align', 'left', 'width', '50%').attr('size', input_size)
}
function check_size(){
let input_size = Math.ceil(($('#outer-search-box').width())*0.12 - 9);
$('#search_input').css('text-align', 'left', 'width', '50%').attr('size', input_size)
}
function cancelModal(modalName, params){
let selectedNames = []
let modalThemes = $('#' + modalName)
$('#' + params).on('click', function(){
let selectedThemes = modalThemes.find('input[type="checkbox"]:checked');
if (params === 'paramsTema'){
selectedNames = selectedThemes.map(function(index, el){
return el.name
})
} else if (params === 'paramsCompetencia') {
selectedNames = selectedThemes.map(function(index, el){
return el.name
})
} else{
selectedNames = selectedThemes.map(function(index, el){
return el.value
})
}
})
modalThemes.find('.modal_cancel').on('click', function(){
let removeItems = modalThemes.find('input[type="checkbox"]:checked')
removeItems.each( function() {
removeTooltipFilter($(this).val())
})
modalThemes.find('input[type="checkbox"]:checked').prop('checked', false)
modalThemes.find('.check.font-weight-bold').removeClass('font-weight-bold')
$('#' + params +' > button').removeClass('font-weight-bold')
selectedNames.each(function(index, el){
if (params === 'paramsTema') {
$('input[name='+el+']').click()
}
else if (params === 'paramsCompetencia') {
$('input[name='+el+']').click()
}
else{
$('input[value='+el+']').click()
}
})
})
}
cancelModal('modalTema', 'paramsTema');
cancelModal('modalCompetencia', 'paramsCompetencia');
cancelModal('modalUf', 'paramsUF');
})
</script>]]>
|
2350
| <![CDATA[<script>
var liferay_botao_recuperacao = $('#liferay_recuperacao');
var liferay_email = $("#liferay_email");
var liferay_mensagem_email = $("#liferay_email_span");
var url_consultar_liferay = '/vitrine/liferay/verificacao/';
var formulario_liferay = $("#liferay_recuperacaoform");
var botao_recuperacao_inicial = $('#btn_senha_recuperacao');
var modal_recuperar_senha = $('#md2');
var modal_recuperar_senha_emails = $('#md5');
var url_home = '/vitrine/';
function noneBlock(id) {
for (var i = 1; i < 6; i++) {
if (id != `md${i}`) {
document.getElementById(`xmd${i}`).click();
}
}
}
function configurar_botao_recuperacao_liferay() {
if (liferay_email.hasClass('success') == true) {
botao_recuperacao_inicial.removeAttr("disabled").css("pointer-events", "unset");
} else {
botao_recuperacao_inicial.attr("disabled", "disabled").css("pointer-events", "none");
}
}
function consultar_liferay() {
var so_num = liferay_email.val().replace(/[^0-9]/g,'');
if (so_num.length == 11){
var email = document.querySelector('input[name = email_recuperacao]:checked').value;
}
else{
var email = liferay_email.val();
}
var form_data = formulario_liferay.serializeArray();
$.ajax({
type: "POST",
url: url_consultar_liferay,
data: {
csrfmiddlewaretoken: $('input[name="csrfmiddlewaretoken"]').val(),
'email': email
},
success: function (data) {
if (data.status === 'TOKEN') {
modal_recuperar_senha.hide();
modal_recuperar_senha_emails.hide;
window.location = url_home;
} else if (data.status == 'PORTAL') {
modal_recuperar_senha.hide();
modal_recuperar_senha_emails.hide;
email_mascara = data.dados.email.substring(4)
window.location = url_home;
}
},
error: (xhr, status, error) => {
if (xhr.status === 404) {
modal_recuperar_senha.hide();
modal_recuperar_senha_emails.hide;
if (xhr.status == 'INEXISTENTE') {
window.location = url_home;
}
else if (xhr.status == 'AUTENTICADO') {
window.location = url_home;
} else {
liferay_mensagem_email.show().text('Usuário não encontrado.');
window.location = url_home;
}
}
}
});
}
function RecuperarSenha(id) {
var cpf = $('#liferay_email').val()
if ($('#liferay_email').hasClass('sem_cpf') == true){
liferay_botao_recuperacao.click();
}
else {
$.ajax({
type: "GET",
url:'/comum/get_emails_aluno/',
data: {
'cpf': cpf
},
success: function (data) {
var lista_emails = data.lista_emails
var div_emails = $('#email-lista')
lista_html = ''
lista_emails.forEach(element => {
email_list = element.split('@')
inicio = email_list[0]
mask_inicio = new Array(inicio.length - 3).join( '*' )
lista_html += '<input style="margin:10px" type="radio" name="email_recuperacao" value="'+element+'">' + inicio.slice(0,4) + mask_inicio + '@' + email_list[1] + '</input><br>'
});
div_emails.html(lista_html)
for (var i = 1; i < 6; i++) {
if (id != `md${i}`) {
document.getElementById(`xmd${i}`).click();
}
}
modal_recuperar_senha_emails.modal('show')
},
error: (xhr, status, error) => {
status = status
}
});
}
}
botao_recuperacao_inicial.on('click', function (e) {
if (liferay_email.hasClass('sem_cpf') == true) {
e.stopPropagation();
}
});
liferay_email.focusout(function () {
var field = $(this);
var so_num = field.val().replace(/[^0-9]/g,'');
var mask_cpf = so_num.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, "$1.$2.$3-$4");
if (field.val()) {
if (validar_email(field.val())) {
liferay_mensagem_email.hide();
field.addClass('success sem_cpf');
configurar_botao_recuperacao_liferay();
} else if (so_num.length == 11 && CPF.validate(mask_cpf)) {
field.addClass('success');
liferay_mensagem_email.hide();
configurar_botao_recuperacao_liferay();
} else {
liferay_mensagem_email.show().text('Favor digite um E-mail ou CPF válido.');
field.removeClass('success');
configurar_botao_recuperacao_liferay();
}
} else {
field.removeClass('success');
configurar_botao_recuperacao_liferay();
}
});
liferay_botao_recuperacao.click(consultar_liferay);
liferay_botao_recuperacao.submit(consultar_liferay);
configurar_botao_recuperacao_liferay();
liferay_email.on("keypress", function (e) {
var code = e.keyCode || e.which;
if (code === 13) {
RecuperarSenha('md5');
// e.preventDefault();
return false;
}
});
</script>]]>
|