Logo CEWEB.br Logo NIC.br Logo CGI.br
Home Sobre o projeto

Sites Verificados

Lista com todos os sítios que foram verificados pela TIC Web Acessibilidade. Dentro de cada domínio, há informações detalhadas sobre as páginas coletadas, bem como os erros e avisos de cada uma *.

Endereço Nota Erros Avisos

www.limeira.sp.gov.br/e/iptu-dividaativa

77.33 46 259
Recomendações Avaliadas
2.2 Garantir que os objetos programáveis sejam acessíveis.

Recomendações

Número Descrição Quantidade Linhas Código Fonte
2.2.6 Presença do elemento SCRIPT sem o elemento NOSCRIPT 25 2593 3084 3391 3426 3986 4278 4643 4754 4895 4914 5474 5728 5826 5953 6125 6660 6770 6968 7409 7447 7556 7626 7757 7872 7952
2593 <![CDATA[<script> function show_modal_load (){ $("#mdCarregando2").modal('show'); } function hide_modal_load (){ $("#mdCarregando2").modal('hide'); } function start_inline_load (element,title = undefined ,margin_top = undefined, active_line_top = true){ stop_inline_load(element); //$('.loading_content_pages').addClass('loading_content_pages_open'); //$('.loading_content_pages').removeClass('loading_content_pages_close'); if (margin_top == undefined){ var height_element = element.css('height'); height_element = height_element.replace('px',""); height_element = parseFloat(height_element); height_element = height_element * 0.40; if (height_element == 0){ height_element = 100; } margin_top = height_element+"px"; } if (title == undefined || title.length < 1 ){ title = "Aguarde um momento"; } var display_line_progress = 'block' if(active_line_top == false){ display_line_progress = 'none' } var cancel = '<button onClick="abort_request()" class="close" style="float:left; font-size:35px" aria-label="Close"><span aria-hidden="true">&times;</span></button>' title = '<div> <i class="fa fa-spinner fa-spin"></i> '+title+'</div>'; var data_default_load_position = element.css('position'); element.attr('data-default-load_position',data_default_load_position); element.css('position','relative'); var height = '100%'; var html = '<div class="show_loading_element" style="height: '+height+'; padding-top:'+margin_top+' " >'+ '<div style="display:'+display_line_progress+'" class="linear-progress"><div class="bar bar1"></div><div class="bar bar2"></div></div>'+ '<div class="loading_element_title">' +title+ '</div>'+ '</div>'+ '</div>'; element.addClass('custom_load_open'); element.removeClass('custom_load_close'); element.append(html); } function stop_inline_load (element){ //$('.loading_content_pages').addClass('loading_content_pages_close'); //$('.loading_content_pages').removeClass('loading_content_pages_open'); var data_default_load_position = element.attr('data-default-load_position'); element.css('position',data_default_load_position); var show_loading_element = element.find('div[class="show_loading_element"]'); element.addClass('custom_load_close'); element.removeClass('custom_load_open'); show_loading_element.remove(); } </script>]]>
3084 <![CDATA[<script> var notify_success = null; var notify_danger = null; var notify_info = null; var notify_warning = null; function custom_show_alert (type,text,title = undefined, timer = undefined){ var notify = null; if (timer == undefined){ timer = 86400000; } if(title != undefined && title.length <=0){ title = undefined; } switch(type){ case 'success' : var class_type = 'custom_alert_success'; var icon = 'glyphicon glyphicon-ok'; var img = 'https://limeira.iibr.com.br/classes/custom_alert/img/custom_alert_success.png'; if (title == undefined){ title = "SUCESSO"; } notify = notify_success; break; case 'danger' : try{ if (show_alert_danger == false){ //ESTA VARIAVEL ESTA COMO GLOVAL NO ARQUIVO CLASSES/CUSTOM SECURITY return false; } }catch(e){} var class_type = 'custom_alert_danger'; var icon = 'glyphicon glyphicon-exclamation-sign'; var img = 'https://limeira.iibr.com.br/classes/custom_alert/img/custom_alert_danger.png'; if (title == undefined){ title = "ERRO"; } notify = notify_danger; break; case 'info' : var class_type = 'custom_alert_info'; var icon = 'glyphicon glyphicon-exclamation-sign'; var img = 'https://limeira.iibr.com.br/classes/custom_alert/img/custom_alert_info.png'; if (title == undefined){ title = "INFO"; } notify = notify_info; break; case 'warning' : var class_type = 'custom_alert_warning'; var icon = 'glyphicon glyphicon-exclamation-sign'; var img = 'https://limeira.iibr.com.br/classes/custom_alert/img/custom_alert_warning.png'; if (title == undefined){ title = "ALERTA"; } notify = notify_warning; break; } if (notify != null){ notify.close(); } notify = $.notify({ icon: icon, title: title, message: text, url:'javascript:void(0);', },{ type: type, offset: { x: 20, y: 75 }, placement: { from: "bottom", align: "right" }, allow_dismiss: true, newest_on_top: true, showProgressbar: false, mouse_over : 'pause', animate: { enter: 'animated slideInRight', exit: 'animated fadeOutRight' }, delay: 1000, timer: timer, template: '<div data-notify="container" class="custom_alert_container '+class_type+' col-lg-3 col-md-4 col-sm-6 col-xs-9 alert alert-{0}" role="alert">' + '<span data-notify="dismiss" aria-hidden="true" class="custom_alert_btn_dismiss">&times;</span>' + '<span class="custom_alert_icon">'+ '<img src="'+img+'" alt="" width="30">' + '</span> ' + '<span data-notify="title" class="custom_alert_title">{1}</span> ' + '<br>'+ '<div class="custom_alert_message"><span data-notify="message">{2}</span></div>' + '</div>' }); switch(type){ case 'success' : notify_success = notify; break; case 'danger' : notify_danger = notify; break; case 'info' : notify_info = notify; break; case 'warning' : notify_warning = notify; break; } } function close_all_notification(){ try{ notify_success.close(); }catch(e){} try{ notify_danger.close(); }catch(e){} try{ notify_info.close(); }catch(e){} try{ notify_warning.close(); }catch(e){} } function close_all_alerts(){ close_all_notification(); } function show_alert_modal(type,text,title=undefined){ custom_show_alert (type,text,title); } function show_alert_page(type,text,title=undefined){ custom_show_alert (type,text,title); } </script>]]>
3391 <![CDATA[<script> function init_toggles(){ var checks = $('.custom_toggle'); checks.each(function( index ) { var check = $(this); if (!check.hasClass('custom_toggle_finished')){ check.addClass('custom_toggle_finished'); var id_check = check.attr('id'); var title = check.attr('data-title-check'); var align = check.attr('data-align'); if (title != undefined && title.length > 0){ var class_align = 'custom_toggle_label_title'; if (align == 'left'){ class_align = 'custom_toggle_label_title_left'; } title = "<span class='"+class_align+"'>"+title+"</span>"; }else{ title = ""; } var label = "<label class='custom_toggle_label' for='"+id_check+"'>"+title+"</label>"; check.after(label); } }); } init_toggles(); </script>]]>
3426 <![CDATA[<script> $('body').on('loading_page', function(){ load_custom_date(); }); var index_custom_date = 1; function load_custom_date (){ var divs_range = $('div[class="date-custom-range"]'); divs_range.each(function( index ) { var div_range = $(this); init_custom_date_range(div_range); }); var input_dates = $('input[type="date"]'); input_dates.each(function( index ) { var input_date = $(this); init_custom_date(input_date, index_custom_date); index_custom_date++; }); } function init_custom_date_range (div){ var inputs = div.find('input[type="date"]'); if (inputs.length == 2){ //div.addClass('input-group'); if (!div.hasClass('input-group')){ div.addClass('input-group'); } var input_left = $(inputs[0]); var input_right = $(inputs[1]); input_left.addClass('date-range-left'); input_right.addClass('date-range-right'); var old_span_separator = div.find('span[class="date-range-separator"]'); old_span_separator = $(old_span_separator).remove(); //input_left.after('<span class="input-group-addon date-range-separator">a</span>'); input_left.after('<span class="input-group-addon date-range-separator"></span>'); } } function init_custom_date (input, index){ var date_is_load = input.attr('data-date-load'); var date_is_ignore = input.attr('data-date-ignore'); var is_only_year = input.attr('data-only-year'); if (date_is_load == 'true'){ return false; } if (date_is_ignore == 'true'){ return false; } input.attr('data-filtro-ignore', 'true'); var old_id = input.attr('data-date-linked'); var aux_input = input.parent().find('input[data-date-id="'+old_id+'"]').remove(); var class_input = input.attr('class'); var required = input.attr('required'); var disabled = input.attr('disabled'); var value = input.val(); value = to_date_br(value); var id = 'id_date_'+index; var aux_div_left = ''; var aux_div_right = ''; var onclick_toggle = "onClick='toggle_custom_date_picker("+'"'+id+'"'+",this)'"; var onclick_clear = "onClick='clear_custom_date_picker("+'"'+id+'"'+",this)'"; var class_only_date_picker = ''; if (input.hasClass('date-range-left')){ aux_div_left = '<span date-action-clear="'+id+'" class="input-group-addon date-custom-action-clear date-left-action data-action-hide" '+onclick_clear+' ><span class="glyphicon glyphicon-trash"></span></span>'; aux_div_left += '<span date-action-open="'+id+'" class="input-group-addon date-custom-action date-left-action" '+onclick_toggle+' ><span class="glyphicon glyphicon-calendar"></span></span>'; aux_div_right = ""; } if (input.hasClass('date-range-right')){ aux_div_left = ""; aux_div_right = '<span date-action-clear="'+id+'" class="input-group-addon date-custom-action-clear date-right-action data-action-hide" '+onclick_clear+' ><span class="glyphicon glyphicon-trash"></span></span>'; aux_div_right += '<span date-action-open="'+id+'" class="input-group-addon date-custom-action date-right-action " '+onclick_toggle+' ><span class="glyphicon glyphicon-calendar"></span></span>'; } if (!input.hasClass('date-range-left') && !input.hasClass('date-range-right')){ aux_div_left = '<div class="input-group" style="width: 100%">'+aux_div_left; aux_div_right = '<span date-action-clear="'+id+'" class="input-group-addon date-custom-action-clear date-right-action data-action-hide" '+onclick_clear+' ><span class="glyphicon glyphicon-trash"></span></span>'; aux_div_right += '<span date-action-open="'+id+'" class="input-group-addon date-custom-action date-action" '+onclick_toggle+'><span class="glyphicon glyphicon-calendar" ></span></span>'; aux_div_right += '</div>'; class_only_date_picker = "date-custom-picker-only"; } aux_input = aux_div_left+'<input '+disabled+' type="text" class="'+class_input+' '+class_only_date_picker+' date-custom-picker" value="'+value+'" required="'+required+'" data-date-id="'+id+'">'+aux_div_right; input.after(aux_input); input.attr('data-date-linked',id); aux_input = $('input[data-date-id="'+id+'"]'); if (is_only_year == 'true'){ var format = "yyyy"; var startView = 2; var minViewMode = 2; var maxViewMode = 2; var startDate = '1900'; var endDate = '3000'; aux_input.mask("9999",{placeholder:"_"}); }else{ var format = "dd/mm/yyyy"; var startView = 0; var minViewMode = 0; var maxViewMode = 4; var startDate = '01/01/1900'; var endDate = '01/01/3000'; aux_input.mask("99/99/9999",{placeholder:"_"}); } aux_input.datepicker({ format : format, todayBtn : "linked", clearBtn : true, language : "pt-BR", autoclose : true, todayHighlight : true, toggleActive : false, startView : startView, minViewMode : minViewMode, maxViewMode : maxViewMode, startDate : startDate, endDate : endDate }).on('changeDate', function(e) { var aux_input = $(e.target); var id = aux_input.attr('data-date-id'); var input = $('input[data-date-linked="'+id+'"]'); var is_only_year = input.attr('data-only-year'); var aux_value = aux_input.val(); aux_value = aux_value.replace(/\_/g, ""); if (aux_value.length == 0){ input.val('').trigger('change'); return false; } if (is_only_year == 'true'){ if (aux_value.length != 4){ return false; } }else{ if (aux_value.length != 10){ return false; } } var date = (e.date); date = new Date(date); var dia = date.getDate(); var mes = date.getMonth()+1; var ano = date.getFullYear(); var hora = date.getHours(); var minuto = date.getMinutes(); var segundos = date.getSeconds(); dia = pad(dia,2); mes = pad(mes,2); date = ano+'-'+mes+'-'+dia; input.val(date).trigger('change'); $('span[date-action-clear="'+id+'"]').removeClass('data-action-hide'); $('span[date-action-open="'+id+'"]').addClass('data-action-hide'); }).on('clearDate', function(e) { /*var aux_input = $(e.target); var id = aux_input.attr('data-date-id'); var input = $('input[data-date-linked="'+id+'"]'); //input.val('').trigger('change'); $('span[date-action-clear="'+id+'"]').addClass('data-action-hide'); $('span[date-action-open="'+id+'"]').removeClass('data-action-hide');*/ }).on('show', function(e) { var aux_input = $(e.target); //aux_input.attr('date-action-state','show'); }).on('hide', function(e) { var aux_input = $(e.target); aux_input.attr('date-action-state','hide'); var id = aux_input.attr('data-date-id'); var input = $('input[data-date-linked="'+id+'"]'); var dates = e.dates; if(dates.length < 1){ input.val('').trigger('change'); } }); input.css('display','none'); input.attr('data-date-load','true'); input.on('change', function(){ var input = $(this); var is_only_year = input.attr('data-only-year'); var id = input.attr('data-date-linked'); var aux_input = $('input[data-date-id="'+id+'"]'); var value = input.val(); if (value.length < 1){ aux_input.val(''); $('span[date-action-clear="'+id+'"]').addClass('data-action-hide'); $('span[date-action-open="'+id+'"]').removeClass('data-action-hide'); return false; } if (is_only_year == 'true'){ value = value.split('-'); value = value[0]; if (value.length == 4){ aux_input.val(value); $('span[date-action-clear="'+id+'"]').removeClass('data-action-hide'); $('span[date-action-open="'+id+'"]').addClass('data-action-hide'); } }else{ value = to_date_br(value); if (value.length == 10){ aux_input.val(value); $('span[date-action-clear="'+id+'"]').removeClass('data-action-hide'); $('span[date-action-open="'+id+'"]').addClass('data-action-hide'); } } }); } function pad (str, max) { str = str.toString(); return str.length < max ? pad("0" + str, max) : str; } function to_date_br (value){ var aux_value = ''; if (value.length == 10){ value = value.split('-'); var dia = value[2]; var mes = value[1]; var ano = value[0]; aux_value = dia+'/'+mes+'/'+ano; value = aux_value; } return value; } function toggle_custom_date_picker (id,btn){ var aux_input = $('input[data-date-id="'+id+'"]'); var btn = $(btn); var verify_toggle = aux_input.attr('date-action-state'); aux_input.datepicker('show'); return false; if (verify_toggle == 'show'){ aux_input.datepicker('hide'); //aux_input.attr('date-action-state','hide'); }else{ aux_input.datepicker('show'); //aux_input.attr('date-action-state','show'); } } function clear_custom_date_picker (id,btn){ var input = $('input[data-date-linked="'+id+'"]'); var aux_input = $('input[data-date-id="'+id+'"]'); aux_input.datepicker('update', ''); $('span[date-action-clear="'+id+'"]').addClass('data-action-hide'); $('span[date-action-open="'+id+'"]').removeClass('data-action-hide'); input.val('').trigger('change'); } function format_mask_date(input){ var value = input.val(); value = value.replace(/\//g, ""); value = value.replace(/\-/g, ""); console.log(value); var dd = value.substr(0, 2); var mm = value.substr(2, 2); var aa = value.substr(4, 4); console.log('dia: '+dd); console.log('mes: '+mm); console.log('ano: '+aa); value = ''; if (dd.length == 2){ value += dd+'/'; } if (mm.length == 2){ value += mm+'/'; } if (value.length == 3 || value.length == 6){ input.val(value); } } </script>]]>
3986 <![CDATA[<script> //atributos //data-upload-type='multiple' //data-upload-accept='.pdf, .txt' //data-upload-descricao='Documentos' //data-upload-max-files='Documentos' //metodos //clear_upload //start_upload //get_files_upload //eventos //init_upload //end_upload var index_upload = 0; var index_upload_file = 0; $.fn.init_upload = function (){ index_upload = index_upload+1; var container = $(this); var index = index_upload; var data_upload_descricao = container.data().uploadDescricao; var data_upload_accept = container.data().uploadAccept; var data_upload_type = container.data().uploadType; var data_upload_max_files = container.data().uploadMaxFiles; var data_index_upload = 'data-upload-index="'+index+'"'; container.data().uploadIndex = index; container.attr('data-upload-container-index',index); if (data_upload_descricao == undefined || data_upload_descricao.length <= 0){ data_upload_descricao = 'Documentos'; } if (data_upload_max_files == undefined || data_upload_max_files.length <= 0){ container.data().uploadMaxFiles = -1; } if (data_upload_accept == undefined || data_upload_accept.length <= 0){ var data_upload_accept = ''; }else{ var data_upload_accept = 'accept="'+data_upload_accept+'"'; } if (data_upload_type == undefined || data_upload_type.length <= 0){ var data_upload_type = ''; } var html_container = '<div class="col-md-10 col-sm-6 col-xs-12">'+ '<h2><i class="fas fa-file"></i> '+data_upload_descricao+'</h2>'+ '</div>'; html_container += '<div class="col-md-1 col-sm-2 col-xs-6" style="float: right" >'+ '<button type="button" class="btn btn-dark" style=" width: 100%" data-toggle="tooltip" data-placement="top" title="" data-original-title="Selecionar Arquivo(s)" onClick="new_select_file_upload('+index+')"> <span class="glyphicon glyphicon-open" aria-hidden="true"></span></button>'+ '<form id="form_upload_arquivo_'+index+'" style="display: none">'+ '<input '+data_index_upload+' '+data_upload_accept+' type="file" id="input_upload_'+index+'" style="display: none" '+data_upload_type+'>'+ '</form>'+ '</div>' html_container += '<div class="col-md-1 col-sm-2 col-xs-6" style="float: right" >'+ '<button type="button" class="btn btn-danger" style=" width: 100%" data-toggle="tooltip" data-placement="top" title="" data-original-title="Remover Todos" onClick="remove_all_file_table_upload('+index+')">'+ '<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>'+ '</button>'+ '</div>'; html_container += '<div class="col-md-12 col-sm-12 col-xs-12" ><hr style="margin-bottom: 0;margin-top: 5px;"></div>'; html_container += '<div class="col-md-12 col-sm-12 col-xs-12" >'+ '<table id="table_upload_'+index+'" data-show-columns="false" data-table-exports="false" data-toggle="table" data-search="false" class="table table-striped table-hover table-condensed" data-pagination="false" data-unique-id="index_file" data-row-style="row_style_table_upload" >'+ '<thead>'+ '<tr>'+ '<th class="col-sm-1" data-field="index_file" data-align="center" data-sortable="true" data-visible="false">#</th>'+ '<th class="col-sm-2" data-field="name_file" data-align="left" data-sortable="true" >Nome do Arquivo</th>'+ '<th class="col-sm-1" data-field="type_file" data-align="center" data-sortable="true">Extens&atilde;o do Arquivo</th>'+ '<th class="col-sm-1" data-field="size_file" data-align="right" data-sortable="true">Tamanho do Arquivo</th>'+ '<th class="col-sm-1" data-field="date_modify" data-align="center" data-sortable="true">&Uacute;ltima Modifica&ccedil;&atilde;o</th>'+ /*'<th class="col-sm-1" data-field="layout_file" data-align="center" data-sortable="false">Layout do Arquivo</th>'+*/ '<th class="col-sm-2" data-field="status" data-align="left" data-sortable="false">Status</th>'+ '<th class="col-sm-2" data-field="status_cod" data-align="left" data-sortable="false" data-visible="false">Status</th>'+ '<th class="col-sm-1" data-field="acao" data-align="center" data-sortable="false"></th>'+ '</tr>'+ '</thead>'+ '</table>'+ '</div>'; container.html(html_container); $('#table_upload_'+index).bootstrapTable(); $('#input_upload_'+index).on('change',function(){ change_input_upload(this); }); try{load_tooltips();}catch(e){} } function new_select_file_upload(index){ var input_upload = $('#input_upload_'+index); input_upload.click(); } function change_input_upload(input){ var files = input.files; var input = $(input); var index = input.data().uploadIndex; var element = $('[data-upload-container-index='+index+']'); var max_files = element.data().uploadMaxFiles; if ((element.get_files_upload().length + files.length) > max_files && max_files != -1){ max_files = (max_files < 10) ? "0"+max_files : max_files; show_alert_page('warning','Permitido no m&aacute;ximo '+max_files+' arquivo(s)',''); return false; } for (var i =0; i < files.length; i++ ){ var file = files[i]; add_file_in_table_upload(file, index); } input.val(''); } function add_file_in_table_upload(arquivo,index){ var table_upload = $('#table_upload_'+index); index_upload_file = index_upload_file+1; var index_file = index_upload_file; if (arquivo){ var nome_arquivo = arquivo.name; var tamanho_arquivo = arquivo.size; tamanho_arquivo = tamanho_arquivo / 1000; if (tamanho_arquivo > 1000) { tamanho_arquivo = tamanho_arquivo / 1000; tamanho_arquivo = tamanho_arquivo + " Mb"; } else { tamanho_arquivo = tamanho_arquivo + " Kb"; } var extensao = arquivo.name.split('.'); extensao = "."+extensao[extensao.length - 1]; var data = table_upload.bootstrapTable('getData'); for (var i =0; i < data.length; i++ ){ var row = data[i]; var name_file = row.name_file; if (name_file == nome_arquivo){ return false; } } var data_modificacao = new Date(arquivo.lastModified); var dia = data_modificacao.getDate(); var mes = data_modificacao.getMonth()+1; var ano = data_modificacao.getFullYear(); var h = data_modificacao.getHours(); var m = data_modificacao.getMinutes(); var s = data_modificacao.getSeconds(); if (dia<10){ dia = '0'+mes; } if (mes<10){ mes = '0'+mes; } if (h<10){ h = '0'+h; } if (m<10){ m = '0'+m; } data_modificacao = dia+'/'+mes+'/'+ano+' '+h+':'+m; var acao = create_btn_action_table_upload(index,index_file); var data = { file : arquivo, index_file : index_file, name_file : nome_arquivo, type_file : extensao, size_file : tamanho_arquivo, date_modify : data_modificacao, status : '', acao : acao, }; table_upload.bootstrapTable('insertRow', {index: 0, row : data}); } } function create_btn_action_table_upload(index,index_file){ var btn = ""; btn = '<div style="display: inline-flex; ">' /*+'<a onclick="view_file('+index+','+index_file+')" class="glyphicon-action btn-detail-table" data-toggle="tooltip" data-placement="top" title="" data-original-title="Visualizar Arquivo">' +'<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>' +'</a>'*/ +'<a onclick="remove_file_table_upload('+index+','+index_file+')" class="glyphicon-action btn-detail-table btn_action_danger" data-toggle="tooltip" data-placement="top" title="" data-original-title="Remover Arquivo">' +'<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>' +'</a>' +'</div>'; return btn; } function remove_file_table_upload(index,index_file){ try{delete_all_tooltips();}catch(e){} $('#table_upload_'+index).bootstrapTable('removeByUniqueId', index_file); try{delete_all_tooltips();}catch(e){} } function remove_all_file_table_upload(index){ try{delete_all_tooltips();}catch(e){} $('#table_upload_'+index).bootstrapTable('removeAll'); try{delete_all_tooltips();}catch(e){} } $.fn.clear_upload = function(){ var element = $(this); var index = element.data().uploadIndex; remove_all_file_table_upload(index); }; $.fn.start_upload = function(descricao = ''){ var element = $(this); var index = element.data().uploadIndex; var table_upload = $('#table_upload_'+index); var data_files = table_upload.bootstrapTable('getData'); element.trigger('init_upload'); upload_file_to_server(data_files,element,descricao); }; $.fn.get_files_upload = function(){ var element = $(this); var index = element.data().uploadIndex; var table_upload = $('#table_upload_'+index); var data_files = table_upload.bootstrapTable('getData'); var files = []; for(var i=0; i<data_files.length; i++){ files.push(data_files[i].file) } return files; }; function upload_file_to_server(data_files,element,descricao){ if (data_files == undefined || data_files.length <= 0){ element.trigger('end_upload',[{status:true, data:[]}]); return false; } var xhr = new XMLHttpRequest(); try{ xhr.open("POST", 'https://limeira.iibr.com.br/classes/custom_upload/custom_upload_controller.php', true); var formData = new FormData(); formData.append('action','upload_file'); formData.append('descricao',descricao); for(var i=0; i<data_files.length; i++){ formData.append('files[]',data_files[i].file); } xhr.send(formData); xhr.addEventListener('readystatechange', function () { if (xhr.readyState === 4 && xhr.status == 200) { var response = xhr.responseText; var response = JSON.parse(response); element.trigger('end_upload',[response]); } }); xhr.addEventListener('error', function () { element.trigger('end_upload',[{status:false, data:"Falha ao salvar arquivo(s)"}]); },false); }catch(e){ element.trigger('end_upload',[{status:false, data:"Falha ao salvar arquivo(s)"}]); } } </script>]]>
4278 <![CDATA[<script> function initCustomFiltros(arr){ if(!Array.isArray(arr)){ return false } for(var i = 0; i < arr.length; i++){ initCustomFiltro(arr[i]) } } function initCustomFiltro(arr){ if(!Array.isArray(arr)){ return false } //Variaveis Internas var _data = [] var _ajax = true //Parametros var id = "" var placeholder = "" var filtro = "" var clear = "" var url = "" var delay = "" var action = "" var multiple = "" var limit = "" var index = "" var type = "" var tags = "" var language = "" var width = "" var term2 = "" var before_select = "" //Eventos var templateSelection = undefined var templateResult = undefined var select = undefined var unselect = undefined var change = undefined var open = undefined var close = undefined for(var i = 0; i < arr.length; i++){ if (arr[i].filtro != undefined){ filtro = arr[i].filtro } if (arr[i].id != undefined){ id = arr[i].id } if (arr[i].placeholder != undefined){ placeholder = arr[i].placeholder } if (arr[i].clear != undefined){ clear = arr[i].clear } if (arr[i].url != undefined){ url = arr[i].url } if (arr[i].delay != undefined){ delay = arr[i].delay } if (arr[i].action != undefined){ action = arr[i].action } if (arr[i].multiple != undefined){ multiple = arr[i].multiple } if (arr[i].data != undefined){ _data = arr[i].data } if (arr[i].limit != undefined){ limit = arr[i].limit } if (arr[i].index != undefined){ index = arr[i].index } if (arr[i].templateSelection != undefined){ templateSelection = arr[i].templateSelection } if (arr[i].templateResult != undefined){ templateResult = arr[i].templateResult } if (arr[i].select != undefined){ select = arr[i].select } if (arr[i].unselect != undefined){ unselect = arr[i].unselect } if (arr[i].change != undefined){ change = arr[i].change } if (arr[i].open != undefined){ open = arr[i].open } if (arr[i].close != undefined){ close = arr[i].close } if (arr[i].type != undefined){ type = arr[i].type } if (arr[i].tags != undefined){ tags = arr[i].tags } if (arr[i].language != undefined){ language = arr[i].language } if (arr[i].width != undefined){ width = arr[i].width } if (arr[i].term2 != undefined){ term2 = arr[i].term2 } if (arr[i].before_select != undefined){ before_select = arr[i].before_select } } if(id == ""){ return false } if (url == "default"){ url = "classes/custom_filtro/ajax_filtro.php" } if (tags == true){ _ajax = false; } switch (filtro){ case 'contribuinte': action = 'buscar_contribuinte' if (placeholder == ""){ placeholder = "Selecione o Contribuinte" } break; case 'origens_modulo': action = 'buscar_origens_modulo' if (placeholder == ""){ placeholder = "Selecione a Origem" } break case 'cadastro_imovel': action = 'buscar_cadastro_imovel' if (placeholder == ""){ placeholder = "Selecione o Im&oacute;vel" } break case 'exercicio': action = 'buscar_exercicio' if (placeholder == ""){ placeholder = "Selecione o Exerc&iacute;cio" } break case 'sim_nao' : if (placeholder == ""){ placeholder = "Sim/N&atilde;o" } _data = [ {id: '1', sigla : 'S' ,text : 'Sim'}, {id: '2', sigla : 'N' ,text : 'N&atilde;o'}, ] _ajax = false break case "": if(url == "" && _data == "" && tags != true){ return false } if(url == "" && _data != ""){ _ajax = false } break default: if(url == "" && _data == "" && tags != true){ return false } if(url == "" && _data != ""){ _ajax = false } } if (url == ""){ url = "https://limeira.iibr.com.br/classes/custom_filtro/ajax_filtro.php" }else{ url = "https://limeira.iibr.com.br/" + url } if (clear === ""){ clear = true } if (multiple === ""){ multiple = false } if (before_select === ""){ before_select = false } if (language == ""){ language = "pt-BR" } if (type == ""){ type = "POST" } if (delay == ""){ delay = 250 } if (limit == ""){ limit = 50 } if (limit == "unlimited"){ limit = undefined } if (index === ""){ index = -1 } if (width == ""){ width = "100%" } if (term2 == ""){ term2 = undefined } if(before_select == true){ $.ajax({ url : url, type: type, tags: tags, dataType: 'json', data: { action : action, page_limit : limit, term2 : term2, }, success: function(row) { $("#"+id).select2({ data : row, placeholder: {id: '-1', text: placeholder}, allowClear: clear, width: width, multiple: multiple, language: language, templateResult: templateResult, templateSelection: templateSelection }) $("#"+id).val(index).trigger('change') } }) }else{ if (_ajax == true){ $("#"+id).select2({ ajax: { url: url, dataType: 'json', delay: delay, type: type, tags: tags, data: function (params) { return { term: params.term, page_limit: limit, action : action, term2 : term2 }; }, processResults: function (data) { return { results: data }; }, cache: true }, escapeMarkup: function (markup) { return markup; }, placeholder: {id: '-1', text: placeholder}, allowClear: clear, multiple : multiple, width: width, language: language, templateResult: templateResult, templateSelection: templateSelection }) $("#"+id).val(index).trigger('change') }else{ $("#"+id).select2({ data : _data, escapeMarkup: function (markup) { return markup; }, placeholder: {id: '-1', text: placeholder}, allowClear: clear, width: width, tags: tags, multiple: multiple, language: language, templateResult: templateResult, templateSelection: templateSelection }) $("#"+id).val(index).trigger('change') } } if(select != undefined){ $("#"+id).on("select2:select", function (e) { select() }) } if(unselect != undefined){ $("#"+id).on("select2:unselect", function (e) { unselect() }) } if(change != undefined){ $("#"+id).on("change", function (e) { change() }) } if(close != undefined){ $("#"+id).on("select2:close", function (e) { close() }) } if(open != undefined){ $("#"+id).on("select2:open", function (e) { open() }) } } function get_select2(id, item = undefined){ if ( $("#"+id).select2("data") == undefined){ return "" } if (item == undefined){ return $("#"+id).select2("data") } var arr_tmp = [] for(var i = 0; i < $("#"+id).select2("data").length ; i++){ arr_tmp[i] = $("#"+id).select2("data")[i][item] } return arr_tmp } </script>]]>
4643 <![CDATA[<script> function set_theme_system(theme){ $.ajax({ url: ' https://limeira.iibr.com.br/classes/custom_usuario/ajax_theme.php', type: 'post', dateType : 'html', data: { theme : theme }, success: function(data){ $("#div_theme_system").html(data) }, error: function(e){ show_alert_page('danger','Erro ao alterar o tema','') } }) } </script>]]>
4754 <![CDATA[<script> function toggle_lock_footer(el){ var footer_page = $('#footer_page'); if(footer_page.hasClass('footer_page_lock')){ footer_page.removeClass('footer_page_lock'); $(el).children('i').removeClass('fa-lock').addClass('fa-unlock'); $(el).attr('data-original-title','Bloquear Barra'); }else{ footer_page.addClass('footer_page_lock'); $(el).children('i').removeClass('fa-unlock').addClass('fa-lock'); $(el).attr('data-original-title','Desbloquear Barra'); } } $(window).scroll(function(){ var top = $('body')[0].getBoundingClientRect().top*-1; if (top>=100){ $('#footer_page').addClass('hide_full_footer'); }else{ $('#footer_page').removeClass('hide_full_footer'); } }); </script>]]>
4895 <![CDATA[<script>toggle_lock_footer($('.footer_infos_lock'));</script>]]>
4914 <![CDATA[<script> $('body').on('loading_page', function(){ load_custom_date(); }); var index_custom_date = 1; function load_custom_date (){ var divs_range = $('div[class="date-custom-range"]'); divs_range.each(function( index ) { var div_range = $(this); init_custom_date_range(div_range); }); var input_dates = $('input[type="date"]'); input_dates.each(function( index ) { var input_date = $(this); init_custom_date(input_date, index_custom_date); index_custom_date++; }); } function init_custom_date_range (div){ var inputs = div.find('input[type="date"]'); if (inputs.length == 2){ //div.addClass('input-group'); if (!div.hasClass('input-group')){ div.addClass('input-group'); } var input_left = $(inputs[0]); var input_right = $(inputs[1]); input_left.addClass('date-range-left'); input_right.addClass('date-range-right'); var old_span_separator = div.find('span[class="date-range-separator"]'); old_span_separator = $(old_span_separator).remove(); //input_left.after('<span class="input-group-addon date-range-separator">a</span>'); input_left.after('<span class="input-group-addon date-range-separator"></span>'); } } function init_custom_date (input, index){ var date_is_load = input.attr('data-date-load'); var date_is_ignore = input.attr('data-date-ignore'); var is_only_year = input.attr('data-only-year'); if (date_is_load == 'true'){ return false; } if (date_is_ignore == 'true'){ return false; } input.attr('data-filtro-ignore', 'true'); var old_id = input.attr('data-date-linked'); var aux_input = input.parent().find('input[data-date-id="'+old_id+'"]').remove(); var class_input = input.attr('class'); var required = input.attr('required'); var disabled = input.attr('disabled'); var value = input.val(); value = to_date_br(value); var id = 'id_date_'+index; var aux_div_left = ''; var aux_div_right = ''; var onclick_toggle = "onClick='toggle_custom_date_picker("+'"'+id+'"'+",this)'"; var onclick_clear = "onClick='clear_custom_date_picker("+'"'+id+'"'+",this)'"; var class_only_date_picker = ''; if (input.hasClass('date-range-left')){ aux_div_left = '<span date-action-clear="'+id+'" class="input-group-addon date-custom-action-clear date-left-action data-action-hide" '+onclick_clear+' ><span class="glyphicon glyphicon-trash"></span></span>'; aux_div_left += '<span date-action-open="'+id+'" class="input-group-addon date-custom-action date-left-action" '+onclick_toggle+' ><span class="glyphicon glyphicon-calendar"></span></span>'; aux_div_right = ""; } if (input.hasClass('date-range-right')){ aux_div_left = ""; aux_div_right = '<span date-action-clear="'+id+'" class="input-group-addon date-custom-action-clear date-right-action data-action-hide" '+onclick_clear+' ><span class="glyphicon glyphicon-trash"></span></span>'; aux_div_right += '<span date-action-open="'+id+'" class="input-group-addon date-custom-action date-right-action " '+onclick_toggle+' ><span class="glyphicon glyphicon-calendar"></span></span>'; } if (!input.hasClass('date-range-left') && !input.hasClass('date-range-right')){ aux_div_left = '<div class="input-group" style="width: 100%">'+aux_div_left; aux_div_right = '<span date-action-clear="'+id+'" class="input-group-addon date-custom-action-clear date-right-action data-action-hide" '+onclick_clear+' ><span class="glyphicon glyphicon-trash"></span></span>'; aux_div_right += '<span date-action-open="'+id+'" class="input-group-addon date-custom-action date-action" '+onclick_toggle+'><span class="glyphicon glyphicon-calendar" ></span></span>'; aux_div_right += '</div>'; class_only_date_picker = "date-custom-picker-only"; } aux_input = aux_div_left+'<input '+disabled+' type="text" class="'+class_input+' '+class_only_date_picker+' date-custom-picker" value="'+value+'" required="'+required+'" data-date-id="'+id+'">'+aux_div_right; input.after(aux_input); input.attr('data-date-linked',id); aux_input = $('input[data-date-id="'+id+'"]'); if (is_only_year == 'true'){ var format = "yyyy"; var startView = 2; var minViewMode = 2; var maxViewMode = 2; var startDate = '1900'; var endDate = '3000'; aux_input.mask("9999",{placeholder:"_"}); }else{ var format = "dd/mm/yyyy"; var startView = 0; var minViewMode = 0; var maxViewMode = 4; var startDate = '01/01/1900'; var endDate = '01/01/3000'; aux_input.mask("99/99/9999",{placeholder:"_"}); } aux_input.datepicker({ format : format, todayBtn : "linked", clearBtn : true, language : "pt-BR", autoclose : true, todayHighlight : true, toggleActive : false, startView : startView, minViewMode : minViewMode, maxViewMode : maxViewMode, startDate : startDate, endDate : endDate }).on('changeDate', function(e) { var aux_input = $(e.target); var id = aux_input.attr('data-date-id'); var input = $('input[data-date-linked="'+id+'"]'); var is_only_year = input.attr('data-only-year'); var aux_value = aux_input.val(); aux_value = aux_value.replace(/\_/g, ""); if (aux_value.length == 0){ input.val('').trigger('change'); return false; } if (is_only_year == 'true'){ if (aux_value.length != 4){ return false; } }else{ if (aux_value.length != 10){ return false; } } var date = (e.date); date = new Date(date); var dia = date.getDate(); var mes = date.getMonth()+1; var ano = date.getFullYear(); var hora = date.getHours(); var minuto = date.getMinutes(); var segundos = date.getSeconds(); dia = pad(dia,2); mes = pad(mes,2); date = ano+'-'+mes+'-'+dia; input.val(date).trigger('change'); $('span[date-action-clear="'+id+'"]').removeClass('data-action-hide'); $('span[date-action-open="'+id+'"]').addClass('data-action-hide'); }).on('clearDate', function(e) { /*var aux_input = $(e.target); var id = aux_input.attr('data-date-id'); var input = $('input[data-date-linked="'+id+'"]'); //input.val('').trigger('change'); $('span[date-action-clear="'+id+'"]').addClass('data-action-hide'); $('span[date-action-open="'+id+'"]').removeClass('data-action-hide');*/ }).on('show', function(e) { var aux_input = $(e.target); //aux_input.attr('date-action-state','show'); }).on('hide', function(e) { var aux_input = $(e.target); aux_input.attr('date-action-state','hide'); var id = aux_input.attr('data-date-id'); var input = $('input[data-date-linked="'+id+'"]'); var dates = e.dates; if(dates.length < 1){ input.val('').trigger('change'); } }); input.css('display','none'); input.attr('data-date-load','true'); input.on('change', function(){ var input = $(this); var is_only_year = input.attr('data-only-year'); var id = input.attr('data-date-linked'); var aux_input = $('input[data-date-id="'+id+'"]'); var value = input.val(); if (value.length < 1){ aux_input.val(''); $('span[date-action-clear="'+id+'"]').addClass('data-action-hide'); $('span[date-action-open="'+id+'"]').removeClass('data-action-hide'); return false; } if (is_only_year == 'true'){ value = value.split('-'); value = value[0]; if (value.length == 4){ aux_input.val(value); $('span[date-action-clear="'+id+'"]').removeClass('data-action-hide'); $('span[date-action-open="'+id+'"]').addClass('data-action-hide'); } }else{ value = to_date_br(value); if (value.length == 10){ aux_input.val(value); $('span[date-action-clear="'+id+'"]').removeClass('data-action-hide'); $('span[date-action-open="'+id+'"]').addClass('data-action-hide'); } } }); } function pad (str, max) { str = str.toString(); return str.length < max ? pad("0" + str, max) : str; } function to_date_br (value){ var aux_value = ''; if (value.length == 10){ value = value.split('-'); var dia = value[2]; var mes = value[1]; var ano = value[0]; aux_value = dia+'/'+mes+'/'+ano; value = aux_value; } return value; } function toggle_custom_date_picker (id,btn){ var aux_input = $('input[data-date-id="'+id+'"]'); var btn = $(btn); var verify_toggle = aux_input.attr('date-action-state'); aux_input.datepicker('show'); return false; if (verify_toggle == 'show'){ aux_input.datepicker('hide'); //aux_input.attr('date-action-state','hide'); }else{ aux_input.datepicker('show'); //aux_input.attr('date-action-state','show'); } } function clear_custom_date_picker (id,btn){ var input = $('input[data-date-linked="'+id+'"]'); var aux_input = $('input[data-date-id="'+id+'"]'); aux_input.datepicker('update', ''); $('span[date-action-clear="'+id+'"]').addClass('data-action-hide'); $('span[date-action-open="'+id+'"]').removeClass('data-action-hide'); input.val('').trigger('change'); } function format_mask_date(input){ var value = input.val(); value = value.replace(/\//g, ""); value = value.replace(/\-/g, ""); console.log(value); var dd = value.substr(0, 2); var mm = value.substr(2, 2); var aa = value.substr(4, 4); console.log('dia: '+dd); console.log('mes: '+mm); console.log('ano: '+aa); value = ''; if (dd.length == 2){ value += dd+'/'; } if (mm.length == 2){ value += mm+'/'; } if (value.length == 3 || value.length == 6){ input.val(value); } } </script>]]>
5474 <![CDATA[<script> function init_action_input (element,data,title, icon){ if (data == undefined || data == null){ return false; } var original_element = element; element = $(element); var element_include = element.parent(); var name_element = element[0].nodeName; var type = element.attr('type'); if ($(original_element).hasClass('input_custom_action_button_active')){ return false; } $(original_element).addClass('input_custom_action_button_active'); var hash = generate_hash(15); $(original_element).attr('data-action-hash',hash); if (name_element == 'SELECT'){ if (!element.parent().hasClass('input-group')){ element.parent().addClass('input-group'); } element.parent().addClass('container-select-input-action'); var element_select = element.parent().children('span'); var border = element_select.children('span').children('span').css('border'); element_select.children('span').children('span').addClass('input_action'); element = element_select; $(original_element).on('select2:unselect',function(e){ var element = $(this); element = element.parent().children('span'); normalize_input_action(element); }); $(original_element).on('select2:select',function(e){ var element = $(this); element = element.parent().children('span'); normalize_input_action(element); }); $(original_element).on('change',function(e){ var element = $(this); element = element.parent().children('span'); normalize_input_action(element); }); element.on('click', function(e){ var element = $(this); normalize_input_action(element); }); var element_ul = element.children('span').children('span').children('.select2-selection__rendered'); element_ul.on('click', function(e){ var element = $(this).parent().parent().parent(); normalize_input_action(element); }); }else if (type == 'date') { try{load_custom_date ();}catch(e){console.log(e)}; var border = element.css('border'); var data_date_linked = element.attr('data-date-linked'); var element_date = $('input[data-date-id="'+data_date_linked+'"]'); if (element_date.hasClass('date-range-left')){ element_date = element_date.parent().children('.date-custom-action-clear')[0]; element_date = $(element_date); }else{ element_date.addClass('input_action'); } }else{ if (!element.parent().hasClass('input-group')){ element.parent().addClass('input-group'); } var border = element.css('border'); element.addClass('input_action'); } if (icon == '' || icon == null || icon == undefined){ icon = 'glyphicon-filter'; } if (title == null || title == undefined || title.length < 1){ var tooltip = ''; }else{ var tooltip = 'data-action-button="true" data-toggle="tooltip" data-placement="left" data-original-title="'+title+'" '; } tooltip = ''; var lis = generate_lis(data); if (border == undefined){ border = ' 1px solid rgb(170, 170, 170) '; } var html_action = '<div data-action-hash-element="'+hash+'" class="input-group-btn custom_action_button" data-action-button="true" '+tooltip+'>'+ '<button type="button" class="btn dropdown-toggle btn_action_open" data-toggle="dropdown" aria-expanded="false" style="border:'+border+' !important">'+ '<span class="glyphicon '+icon+'" aria-hidden="true"></span> <span class="caret"></span></button>'+ '<ul class="dropdown-menu dropdown-menu-right dropdown-input-action" role="menu" data-action-element="'+original_element+'" >'+ '<div class="btn_action_open_title" >'+title+'</div>'+'<li class="divider"></li>'+lis+ '</ul>'+ '</div>'; var old_element_include = element_include.parent().find('div[data-action-button="true"]'); if (old_element_include.length < 1 ){ if (type == 'date'){ element_date.before(html_action); normalize_input_action(element_date.parent().children('span')); }else{ $(original_element).before(html_action); normalize_input_action($(original_element).parent().children('span')); } } } function refresh_action_input_data (element, data){ if (data == undefined || data == null || element == undefined || element == null){ return false; } element = $(element); var data_action_hash = element.attr('data-action-hash'); var element_action = $('div[data-action-hash-element="'+data_action_hash+'"]'); var ul_element = element_action.children('.dropdown-input-action'); ul_element.find('.li_action_option').remove(); var lis = generate_lis(data); ul_element.append(lis); } function generate_lis (data){ var lis = ''; var verify_isdefault = false; for (var i=0; i < data.length; i++){ var data_li = data[i]; var data_action_id = data_li.id; var data_action_text = data_li.text; var isdefault = data_li.isdefault; var class_isdefault = ''; var onclick = 'click_action_li(this);'; var data_li = btoa(JSON.stringify(data_li)); if (isdefault && !verify_isdefault){ verify_isdefault = true; var class_isdefault = 'li_action_selected'; } var li = '<li class="li_action_option '+class_isdefault+'" onClick="'+onclick+'" data-action-id='+data_action_id+' data-action-data='+data_li+' data-action-text='+data_action_text+' ><a>'+data_action_text+'</a>'; lis = lis+li; } return lis; } function click_action_li (element){ element = $(element); var lis = element.parent().children('li'); lis.removeClass('li_action_selected'); element.addClass('li_action_selected'); var hash = element.parent().parent().attr('data-action-hash-element'); var original_element = $('[data-action-hash="'+hash+'"]'); original_element = $(original_element); var data_action_id = element.attr('data-action-id'); var data_action_text = element.attr('data-action-text'); var data_action_data = element.attr('data-action-data'); original_element.attr('data-action-id', data_action_id); original_element.attr('data-action-text', data_action_text); original_element.attr('data-action-data', data_action_data); data_action_data = JSON.parse(atob(data_action_data)); original_element.trigger('btn_action_change', data_action_data); } function normalize_input_action(element){ try{ var aux_element = element.children('span').children('span'); var height = aux_element.css('height'); var button = element.parent().children('.input-group-btn').children('.btn_action_open')[0]; button = $(button); height = height.replace('px', ''); button.css('min-height', height); }catch(e){ } } function generate_hash(len, charSet) { charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var randomString = ''; for (var i = 0; i < len; i++) { var randomPoz = Math.floor(Math.random() * charSet.length); randomString += charSet.substring(randomPoz,randomPoz+1); } return randomString; } </script>]]>
5728 <![CDATA[<script> function get_size_screen(){ var width = document.body.clientWidth; if (width > 1280){ return 'LG'; } if (width >= 800){ return 'MD'; } if (width > 768){ return 'SM'; } return 'XS'; } function verifica_zoom_page(){ if (get_size_screen() == 'MD'){ set_zoom_page(80,'S'); }else{ set_zoom_page(100,'S'); } } function set_zoom_page(value,verifica='N'){ $.ajax({ url: 'https://limeira.iibr.com.br/classes/custom_zoom/custom_zoom_domain.php', type: 'post', dataType: 'html', data: { action : 'set_zoom', value : value, verifica : verifica, }, success: function(data){ data = JSON.parse(data.trim()); if (data.status){ alter_zoom_page(data.data); } },error: function(e){} }); } function alter_zoom_page(value){ $('body').css('zoom', ''+value+'%'); $('.zoom_page_view').html(parseInt(value)+'%'); } function alter_zoom_mais(){ var zoom = parseInt(($('body').css('zoom')*100)+10); if (zoom >200){ zoom = 200; } set_zoom_page(zoom,'N'); setTimeout(function(){$('.nav.navbar-nav.navbar-right').children('li').addClass('open')},0.5); } function alter_zoom_menos(){ var zoom = parseInt(($('body').css('zoom')*100)-10); if (zoom < 50){ zoom = 50; } set_zoom_page(zoom,'N'); setTimeout(function(){$('.nav.navbar-nav.navbar-right').children('li').addClass('open')},0.5); } </script>]]>
5826 <![CDATA[<script>verifica_zoom_page();</script>]]>
5953 <![CDATA[<script> var nav_bar_left = $('.nav_bar'); var nav_bar_top = $('.navbar-fixed-top'); var footer_page = $('.footer_page'); var right_col = $('.right_col'); var nav_bar_back_sm = $('.nav_bar_back_sm'); var content_pages_title = $('.content_pages_title'); function toggle_show_footer(){ if($('#btn_show_footer').html() == '<i class="fa fa-chevron-up"></i>'){ $('#btn_show_footer').html('<i class="fa fa-chevron-down"></i>') $('.footer_fixed footer').css('cssText', 'height:275px !important;'); }else{ $('#btn_show_footer').html('<i class="fa fa-chevron-up"></i>') $('.footer_fixed footer').css('cssText', 'height:55px !important'); } } $('footer .buttons_footer .btn').click(function() { }) function toggle_nav_bar(){ if ($(document).width() <= 990){ nav_bar_left.toggleClass('nav_close_sm'); nav_bar_left.toggleClass('open_sm'); nav_bar_back_sm.toggleClass('close_nav_back'); nav_bar_back_sm.toggleClass('open_nav_back'); $('body').toggleClass('hidden_overflow'); }else{ nav_bar_left.toggleClass('open'); nav_bar_left.toggleClass('nav_close'); nav_bar_top.toggleClass('nav_bar_left_close'); footer_page.toggleClass('nav_bar_left_close'); right_col.toggleClass('nav_bar_left_close'); content_pages_title.toggleClass('nav_bar_left_close'); } } $(window).resize(function() { verify_width_nav_bar(); }); function verify_width_nav_bar(){ if ($(document).width() <= 990){ if (!nav_bar_left.hasClass('open_sm')){ nav_bar_left.addClass('nav_close_sm'); nav_bar_left.removeClass('open_sm'); close_nav_back(); } }else{ $('#btn_show_footer').html('<i class="fa fa-chevron-up"></i>') $('.footer_page').css('cssText', ''); nav_bar_left.addClass('nav_close_sm'); nav_bar_left.removeClass('open_sm'); close_nav_back(); if (nav_bar_left.hasClass('open')){ nav_bar_left.removeClass('nav_close'); nav_bar_top.removeClass('nav_bar_left_close'); footer_page.removeClass('nav_bar_left_close'); right_col.removeClass('nav_bar_left_close'); content_pages_title.removeClass('nav_bar_left_close'); }else{ nav_bar_left.addClass('nav_close'); nav_bar_top.addClass('nav_bar_left_close'); footer_page.addClass('nav_bar_left_close'); content_pages_title.addClass('nav_bar_left_close'); } } } function close_nav_bar_sm(){ nav_bar_left.addClass('nav_close_sm'); nav_bar_left.removeClass('open_sm'); close_nav_back(); } function close_nav_back(){ nav_bar_back_sm.removeClass('open_nav_back'); nav_bar_back_sm.addClass('close_nav_back'); $('body').removeClass('hidden_overflow'); } </script>]]>
6125 <![CDATA[<script> verificar_url(); $(document).ready(function () { NProgress.start(); clear_input_all_boostraptable(); }); $(window).load(function () { NProgress.done(); clear_input_all_boostraptable(); }); $(document).on('swiperight',function (e,data){ //console.log(e) //console.log(data) // if($('.modal-backdrop.fade.in').length == 0){ // if ($(document).width() <= 990){ // if($('.nav_bar_back_sm.hide-md.open_nav_back').length == 0 && $('.nav_bar.open.open_sm').length == 0){ // toggle_nav_bar() // return false // } // }else{ // if($('.nav_bar.nav_close_sm.open').length == 0){ // toggle_nav_bar() // return false // } // } // } }) //$('html').on('click auxclick contextmenu', function(e) { //// e.preventDefault(); //// console.log(e.which); //// console.log(e.type); // // if(e.type=="contextmenu"){ //// console.log(e) // e.preventDefault(); // $('#menu_oculto').css('display','block') // $('#menu_oculto').css('left', e.clientX) // $('#menu_oculto').css('top', e.clientY) //// console.log("Context menu prevented."); // return; // } // $('#menu_oculto').css('display','none') // switch(e.which) { // case 1: // //window.location = $(this).attr('href'); //// console.log("ONE"); // break; // case 2: // //window.open($(this).attr('href')); //// console.log("TWO"); // break; // case 3: //// console.log("THREE"); // break; // } //}); function verificar_url() { var url = window.location.href; var page = url.split("#"); try { page = page[1].trim(); page = page.split("$$"); if (page != "" ) { load_page(page[1],page[3]); } else { load_page_default(); } active_menu(page[2]); } catch(e) { load_page_default(); } } function load_page_default(){ if ($('#li_59_2').hasClass('menu-only')){ $('#li_59_2').children('a').click(); }else{ $('#li_59_2').click(); } active_menu('li_59_2'); } function load_page(cod_page, tipo) { if(cod_page == ""){ return false; } clear_title_page(); close_all_notification(); close_nav_bar_sm(); try{ close_all_notification(); }catch(err){} $('#content_pages').html('').trigger('change'); start_inline_load($('.right_col')); try{ $.ajax({ url: 'https://limeira.iibr.com.br/classes/custom_dashboard/load_page.php', type: 'get', dataType: 'html', data: { safe : cod_page, tipo : tipo, action : 'load_page', }, success: function (data) { show_page(data); try{ init_custom_masks(); init_custom_type_search(); init_input2() }catch(err){} normalize_action_clear_select2_multiple(); verify_title_page(); setTimeout(function(){clear_input_all_boostraptable()}, 300) }, error: function (e) { stop_inline_load($('.right_col')); var status = e.status; show_alert_page('danger','Erro ao carregar página',''); } }); }catch (e){ stop_inline_load($('.right_col')); show_alert_page('danger','Erro ao carregar página',''); } } function load_page_html(url, element = 'content_pages') { if(url == null || url == ''){ return false; } clear_title_page(); close_all_notification(); close_nav_bar_sm(); try{ close_all_notification(); }catch(err){} $('#content_pages').html('').trigger('change'); start_inline_load($('.right_col')); try{ $.ajax({ url: url, type: 'get', dataType: 'html', data: {}, success: function (data) { show_page(data,element); try{ init_custom_masks(); init_custom_type_search(); init_input2() }catch(err){} normalize_action_clear_select2_multiple(); verify_title_page(); setTimeout(function(){clear_input_all_boostraptable()}, 300) }, error: function (e) { stop_inline_load($('.right_col')); var status = e.status; show_alert_page('danger','Erro ao carregar página',''); } }); }catch (e){ stop_inline_load($('.right_col')); show_alert_page('danger','Erro ao carregar página',''); } } function clear_input_all_boostraptable(){ $('.pull-right.search').children('input').val('').trigger('keyup'); } function init_mask() { $('.input_is_mask').each(function( index ) { $(this).maskMoney().trigger('mask.maskMoney'); }); $('.input_is_mask').each(function( ) { $(this).change(function() { var max = $(this).attr('max'); var min = $(this).attr('min'); var valor = get_value_mask_input($(this)); if (valor > max){ $(this).val(max); //$(this).trigger('mask.maskMoney'); } if (valor < min){ $(this).val(min); //$(this).trigger('mask.maskMoney'); } $(this).maskMoney().trigger('mask.maskMoney'); }); }); } function create_input (value,id='',data_thousands='.',data_decimal=',',data_prefix='',data_suffix='',data_precision='1',data_allow_zero=true, min = null , max = null,onchage = null){ //'use strict'; var input = '<input '+ 'style ="height: 30px" '+ 'type ="text" '+ 'min ="'+min+'" '+ 'max ="'+max+'" '+ 'value ="'+value+'" '+ 'data-allow-zero ="'+data_allow_zero+'" '+ 'data-thousands ="'+data_thousands+'" '+ 'data-decimal ="'+data_decimal+'" '+ 'data-prefix ="'+data_prefix+'" '+ 'data-suffix ="'+data_suffix+'" '+ 'data-precision ="'+data_precision+'" '+ 'id ="'+id+'" '+ 'onChange ="'+onchage+'" '+ 'class ="form-control input_is_mask">'; return input; } function get_value_input_html (html_input,is_mask){ var html_div = '<div style="display: none" id="div_input_get_value" ></div>'; $('body').append(html_div); var div_input = $('#div_input_get_value'); div_input.append(html_input); var input = div_input.children()[0]; if (is_mask){ init_mask(); var value = get_value_mask_input($(input)); }else { var value = $(input).val(); } div_input.remove(); return value; } function get_value_mask_input (input){ return input.maskMoney('unmasked')[0]; if (input.attr("data-allow-empty") != 'true' && input.val().length > 0){ var value = input.maskMoney('unmasked')[0]; }else{ var value = ''; } return value; } function show_page(data, id = 'content_pages'){ $('#'+id).html(data); $("#"+id).css({ "opacity":"0", "display":"block", }).show().animate({opacity:1}); load_tooltips(); $('body').trigger('loading_page'); setTimeout(stop_inline_load($('.right_col')),10000); } function hide_page (){ $("#content_pages").css({"display":"none"}); } function toggle_title (title){} function load_tooltips(){ $('[data-toggle="tooltip"]').tooltip({ container: '#content_pages' //container: '' }); $('[data-toggle="tooltip"]').on('click',function(){ delete_all_tooltips(); }); } function delete_all_tooltips(){ $('.content_pages').children('.tooltip').remove(); } function set_fa_table_pagination(){ $(".fixed-table-pagination li.page-first a").text(""); $(".fixed-table-pagination li.page-first a").addClass("fal fa-arrow-to-left"); $(".fixed-table-pagination li.page-pre a").text(""); $(".fixed-table-pagination li.page-pre a").addClass("fal fa-angle-left"); $(".fixed-table-pagination li.page-next a").text(""); $(".fixed-table-pagination li.page-next a").addClass("fal fa-angle-right"); $(".fixed-table-pagination li.page-last a").text(""); $(".fixed-table-pagination li.page-last a").addClass("fal fa-arrow-to-right"); } function normalize_action_clear_select2_multiple(){ $('select').on('change',function(){ var select = $(this); var select2_container = select.next(); if (select2_container.hasClass('select2-container')){ var select2_multiple = select2_container.children('span').children('.select2-selection--multiple'); if (select2_multiple.hasClass('select2-selection--multiple')){ if (select2_container.innerHeight()>40){ select2_container.removeClass('select2-selection__clear_square'); }else{ select2_container.addClass('select2-selection__clear_square'); } } } }); } var CURRENT_URL = window.location.href.split('#')[0].split('?')[0], $BODY = $('body'), $MENU_TOGGLE = $('#menu_toggle'), $SIDEBAR_MENU = $('#sidebar-menu'), $SIDEBAR_FOOTER = $('.sidebar-footer'), $LEFT_COL = $('.left_col'), $RIGHT_COL = $('.right_col'), $NAV_MENU = $('.nav_menu'), $FOOTER = $('footer'); init_sidebar(); function init_sidebar() { // TODO: This is some kind of easy fix, maybe we can improve this var setContentHeight = function () { // reset height $RIGHT_COL.css('min-height', $(window).height()); var bodyHeight = $BODY.outerHeight(), footerHeight = $BODY.hasClass('footer_fixed') ? -10 : $FOOTER.height(), leftColHeight = $LEFT_COL.eq(1).height() + $SIDEBAR_FOOTER.height(), contentHeight = bodyHeight < leftColHeight ? leftColHeight : bodyHeight; // normalize content contentHeight -= $NAV_MENU.height() + footerHeight; $RIGHT_COL.css('min-height', contentHeight); }; $SIDEBAR_MENU.find('a').on('click', function(ev) { //console.log('clicked - sidebar_menu'); var $li = $(this).parent(); if ($li.is('.active')) { if ($li.is('.li-menu')) { $li.removeClass('active active-sm'); } $('ul:first', $li).slideUp(function() { setContentHeight(); }); } else { // prevent closing menu if we are on child menu if (!$li.parent().is('.child_menu')) { $SIDEBAR_MENU.find('li').removeClass('active active-sm'); //remove o ativo dos outros menus slides $SIDEBAR_MENU.find('li ul').slideUp(); }else{ if ( $BODY.is( ".nav-sm" ) ){ $SIDEBAR_MENU.find( "li" ).removeClass( "active active-sm" ); $SIDEBAR_MENU.find( "li ul" ).slideUp(); } } //$li.addClass('active'); if ($li.is('.li-menu')) { $li.addClass('active'); }else { var ul = $li.parent(); ul.each(function(){ $(this).children('li').removeClass('active active-sm'); }); $li.addClass('active'); } $('ul:first', $li).slideDown(function() { setContentHeight(); }); } if ($li.is('.menu-only')) { $li.addClass('active'); } if ($li.is('.menu-option-only')) { $li.removeClass('active'); } }); // toggle small or large menu $MENU_TOGGLE.on('click', function() { //console.log('clicked - menu toggle'); if ($BODY.hasClass('nav-md')) { $SIDEBAR_MENU.find('li.active ul').hide(); $SIDEBAR_MENU.find('li.active').addClass('active-sm').removeClass('active'); } else { $SIDEBAR_MENU.find('li.active-sm ul').show(); $SIDEBAR_MENU.find('li.active-sm').addClass('active').removeClass('active-sm'); } $BODY.toggleClass('nav-md nav-sm'); setContentHeight(); }); // check active menu $SIDEBAR_MENU.find('a[href="' + CURRENT_URL + '"]').parent('li').addClass('current-page'); $SIDEBAR_MENU.find('a').filter(function () { return this.href == CURRENT_URL; }).parent('li').addClass('current-page').parents('ul').slideDown(function() { setContentHeight(); }).parent().addClass('active'); // recompute content when resizing // $(window).smartresize(function(){ // setContentHeight(); // }); setContentHeight(); // fixed sidebar if ($.fn.mCustomScrollbar) { $('.menu_fixed').mCustomScrollbar({ autoHideScrollbar: true, theme: 'minimal', mouseWheel:{ preventDefault: true } }); } } function setContentHeight () { $RIGHT_COL.css('min-height', $(window).height()); var bodyHeight = $BODY.outerHeight(), footerHeight = $BODY.hasClass('footer_fixed') ? -10 : $FOOTER.height(), leftColHeight = $LEFT_COL.eq(1).height() + $SIDEBAR_FOOTER.height(), contentHeight = bodyHeight < leftColHeight ? leftColHeight : bodyHeight; contentHeight -= $NAV_MENU.height() + footerHeight; $RIGHT_COL.css('min-height', contentHeight); }; function verify_title_page(){ var title_page = $($('#content_pages').find('.title_page')[0]); var content_pages_title = $('#content_pages_title'); clear_title_page(); if (title_page.length > 0){ content_pages_title.append(title_page); } } function clear_title_page(){ var title_page = $($('#content_pages').find('.title_page')[0]); var content_pages_title = $('#content_pages_title'); content_pages_title.children().remove(); } function active_menu(id){ var $li = $("#"+id).parent(); var $ul_menu_child = $li.parent(); var $li_menu = $ul_menu_child.parent(); var $ul_menus = $li_menu.parent(); $ul_menus.each(function(){ $(this).children('li').removeClass('active active-sm'); }); $li.addClass('active'); $li_menu.addClass('active'); $ul_menu_child.slideDown(function() { //setContentHeight(); }); } </script>]]>
6660 <![CDATA[<script> function init_detail_table (table){ if (!table.hasClass('table_content_details')){ return false; } var btn = table.find('.btn-detail-table'); table.find('.btn-detail-table').off('click').on('click',function(){ create_tr_detail($(this)); }); } function create_tr_detail (btn){ var tr = btn.parent().parent().parent(); var table = btn.parent().parent().parent().parent().parent(); var tr_detail = tr.next(); if (!tr_detail.hasClass('tr-detail-view')){ var id = generate_hash(15); var tr_detail_html = "<tr id='"+id+"' data-tr-detail-view='true' class='tr-detail-view detail_view_close'><td><div></td></tr>"; tr.after(tr_detail_html); tr_detail = tr.next(); normalize_details_views_tr(table); } toggle_detail_tr(tr_detail,table); } function toggle_detail_tr (tr,table){ if (tr.hasClass('detail_view_close')){ var tr_data = tr.prev(); var id = tr.attr('id'); var data_uniqueid = tr_data.attr("data-uniqueid"); var data = table.bootstrapTable('getRowByUniqueId', data_uniqueid); tr.removeClass('detail_view_close'); tr.addClass('detail_view_open'); var element = tr.children('td').children('div'); table.trigger('open_detail_view',[ data, element]); }else{ tr.addClass('detail_view_close'); tr.removeClass('detail_view_open'); } } function normalize_details_views_tr (table){ var ths = table.children('thead').children('tr').children('th'); var count = ths.length; var trs = table.find('.tr-detail-view'); trs.each(function( index ) { $(this).children('td').attr('colspan', count); }); } function generate_hash(len, charSet) { charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var randomString = ''; for (var i = 0; i < len; i++) { var randomPoz = Math.floor(Math.random() * charSet.length); randomString += charSet.substring(randomPoz,randomPoz+1); } return randomString; } function get_selected_table_details(table, class_sub_table){ if (!table.hasClass('table_content_details')){ return false; } var trs = table.find(".detail_view_open"); var data_all = []; trs.each(function(){ var tr = $(this); var table = tr.find('table.'+class_sub_table); var data = table.bootstrapTable('getAllSelections'); data_all = data_all.concat(data); }); return data_all; } </script>]]>
6770 <![CDATA[<script> function init_input_tag (element_tag){ element_tag.attr('multiple',''); element_tag.tagsinput('items'); var hash = generate_hash(15); element_tag.attr('data-element-tag-hash',hash); var btn = '<span onClick="clear_element_tag(this)" data-btn-clear-tag-hash="'+hash+'" class="input-group-addon tag-btn-clear" ><span class="glyphicon glyphicon-trash"></span></span>'; var tagsinput = element_tag.prev().children('.bootstrap-tagsinput'); element_tag.prev().find('.tag-btn-clear').remove(); tagsinput.after(btn); } function clear_element_tag(btn){ btn = $(btn); var hash = btn.attr('data-btn-clear-tag-hash'); var element_tag = $('select[data-element-tag-hash="'+hash+'"]'); element_tag.tagsinput('removeAll'); btn.focus(); } function clear_tag_input (input){ input = $(input); input.tagsinput('removeAll'); } function get_data_tags (element_tag){ var data = element_tag.val(); if (data == null){ data = []; } return data; } function generate_hash(len, charSet) { charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var randomString = ''; for (var i = 0; i < len; i++) { var randomPoz = Math.floor(Math.random() * charSet.length); randomString += charSet.substring(randomPoz,randomPoz+1); } return randomString; } </script>]]>
6968 <![CDATA[<script> var modal_historico = $('#modal_historico'); var modal_content_historico = $('#modal_content_historico'); var title_modal_historico = $('#title_modal_historico'); var table_historico_objetos = $('#table_historico_objetos'); var div_detail_historico = $('#div_detail_historico'); var container_cadastrar_historico = $('#container_cadastrar_historico'); var btn_container_cadastrar_historico = $('#btn_container_cadastrar_historico'); var text_new_historico = $('#text_new_historico'); var container_excluir_historico = $('#container_excluir_historico'); var btn_container_excluir_historico = $('#btn_container_excluir_historico'); var text_descricao_excluir = $('#text_descricao_excluir'); var master_cod_objeto = ''; var master_type_objeto = ''; var master_id_historico = ''; var master_id_assunto = ''; var is_firt_init = true; var historico_edicao_arquivos = false; var historico_edicao = false; var historico_safe = null; $('#container_upload_historico').on('end_upload',function(e,data){ if(data.status == true){ save_descricao_new_historico(data.data); }else{ stop_inline_load(modal_content_historico); try{show_alert_page('danger',data.data,'')}catch(e){alert(data.data)} } }); function open_historico(objeto,tipo,title_modal,show_cadastrar=true){ if(show_cadastrar){ $('#footer_historico_modal').show(); }else{ $('#footer_historico_modal').hide(); } historico_edicao = false; historico_safe = null; if (is_firt_init){ is_firt_init = false; init_table(table_historico_objetos, generate_hash_historico(20)); initSelect2_assunto_historico(); $('#container_upload_historico').init_upload(); } master_cod_objeto = objeto; master_type_objeto = tipo; modal_historico.modal('show'); title_modal_historico.html(title_modal); table_historico_objetos.attr('data-name',title_modal); close_container_cadastrar_historico(); close_container_excluir_historico(); search_historico(); $('#container_upload_historico').clear_upload(); } function load_table_historico_objetos(data){ table_historico_objetos.bootstrapTable('load', data); } function load_detail_historico(data){ div_detail_historico.html(data); } function open_container_cadastrar_historico(){ historico_edicao_arquivos = false; historico_edicao = false; historico_safe = null; close_container_excluir_historico(); container_cadastrar_historico .slideDown(); $("#container_inputs_historico") .slideDown(); btn_container_cadastrar_historico .css('display','block'); text_new_historico .val(''); $('#select2_assunto_historico').val('-1').trigger('change'); $('#num_processo_historico').val('').trigger('change'); $('#ano_processo_historico').val('').trigger('change'); $('#container_upload_historico').clear_upload(); $('#btn_salvar_historico').text('Salvar'); } function close_container_cadastrar_historico(){ historico_edicao_arquivos = false; historico_edicao = false; historico_safe = null; $('#container_upload_historico').slideDown(); $("#container_inputs_historico").slideDown(); container_cadastrar_historico.slideUp() btn_container_cadastrar_historico.css('display','none'); text_new_historico.val(''); $('#select2_assunto_historico').val('-1').trigger('change'); $('#num_processo_historico').val('').trigger('change'); $('#ano_processo_historico').val('').trigger('change'); $('#container_upload_historico').clear_upload(); $('#btn_salvar_historico').text('Salvar'); } function editar_historico(safe,historico){ $('#container_upload_historico').clear_upload(); $('#container_upload_historico').slideUp(); open_container_cadastrar_historico(); var data_historico = $('#table_historico_objetos').bootstrapTable('getRowByUniqueId',historico); $('#text_new_historico').val(data_historico.descricao).trigger('change'); $('#select2_assunto_historico').val(data_historico.id_assunto).trigger('change'); $('#num_processo_historico').val(data_historico.num_processo).trigger('change'); $('#ano_processo_historico').val(data_historico.ano_processo+'-01-01').trigger('change'); $('#btn_salvar_historico').text('Editar'); historico_edicao_arquivos = false; historico_edicao = true; historico_safe = safe; } function add_file_historico(safe){ btn_container_cadastrar_historico .css('display','block'); $('#container_upload_historico').clear_upload(); $("#container_inputs_historico") .slideUp(); $('#container_upload_historico') .slideDown(); container_cadastrar_historico .slideDown(); historico_edicao_arquivos = true; historico_edicao = true; historico_safe = safe; $('#btn_salvar_historico').text('Adicionar'); } function search_historico(){ start_inline_load(modal_content_historico,'Buscando Hist&oacute;rico'); table_historico_objetos.bootstrapTable('removeAll'); $.ajax({ url: 'https://limeira.iibr.com.br/classes/custom_historico/custom_historico_controller.php', type: 'post', dataType: 'html', data: { action : 'consultar_historico', objeto : master_cod_objeto, tipo : master_type_objeto, }, success: function(data){ stop_inline_load(modal_content_historico); data = JSON.parse(data.trim()); if (data.status){ load_detail_historico(data.detail_historico); load_table_historico_objetos(data.data); } }, error: function(e){ stop_inline_load(modal_content_historico); try{show_alert_page('danger','Erro ao se comunicar com o servidor','')}catch(e){alert('Erro ao se comunicar com o servidor')} } }); } function init_save_descricao_new_historico(){ start_inline_load(modal_content_historico,'Salvando Hist&oacute;rico'); $('#container_upload_historico').start_upload(text_new_historico.val()); } function save_descricao_new_historico(files){ var descricao = text_new_historico.val(); // if (descricao.length < 1 && historico_edicao_arquivos != true){ // stop_inline_load(modal_content_historico); // try{show_alert_page('warning','Insira a descrição','')}catch(e){alert('Insira a descrição')} // return false; // } $.ajax({ url: 'https://limeira.iibr.com.br/classes/custom_historico/custom_historico_controller.php', type: 'post', dataType: 'html', data: { action : 'cadastrar_historico', objeto : master_cod_objeto, tipo : master_type_objeto, descricao : descricao, assunto : master_id_assunto, num_processo : $('#num_processo_historico').val(), ano_processo : $('#ano_processo_historico').val(), edicao : historico_edicao, edicao_arquivos : historico_edicao_arquivos, safe : historico_safe, files : JSON.stringify(files) }, success: function(data){ stop_inline_load(modal_content_historico); data = JSON.parse(data.trim()); if (data.status){ try{show_alert_page('success',data.data,'')}catch(e){alert(data.data)} close_container_cadastrar_historico(); close_container_excluir_historico(); search_historico(); }else{ try{show_alert_page('warning',data.data,'')}catch(e){alert(data.data)} } }, error: function(e){ stop_inline_load(modal_content_historico); try{show_alert_page('danger','Erro ao se comunicar com o servidor','')}catch(e){alert('Erro ao se comunicar com o servidor')} } }); } function delete_descricao_historico(){ start_inline_load(modal_content_historico,'Excluindo Hist&oacute;rico'); if (master_id_historico.length < 1){ return false; } $.ajax({ url: 'https://limeira.iibr.com.br/classes/custom_historico/custom_historico_controller.php', type: 'post', dataType: 'html', data: { action : 'excluir_historico', objeto : master_cod_objeto, tipo : master_type_objeto, historico : master_id_historico }, success: function(data){ stop_inline_load(modal_content_historico); data = JSON.parse(data.trim()); if (data.status){ try{show_alert_page('success',data.data,'')}catch(e){alert(data.data)} close_container_cadastrar_historico(); close_container_excluir_historico(); search_historico(); }else{ try{show_alert_page('danger',data.data,'')}catch(e){alert(data.data)} } }, error: function(e){ stop_inline_load(modal_content_historico); try{show_alert_page('danger','Erro ao se comunicar com o servidor','')}catch(e){alert('Erro ao se comunicar com o servidor')} } }); } function open_container_excluir_historico(id, id_pure){ master_id_historico = id; var data = table_historico_objetos.bootstrapTable('getRowByUniqueId', id_pure); descricao = data['descricao']; text_descricao_excluir.text(descricao); close_container_cadastrar_historico(); container_excluir_historico.slideDown(); btn_container_excluir_historico .css('display','block'); } function close_container_excluir_historico(){ container_excluir_historico.slideUp(); btn_container_excluir_historico .css('display','none'); text_descricao_excluir .text(''); } function generate_hash_historico(len, charSet) { charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var randomString = ''; for (var i = 0; i < len; i++) { var randomPoz = Math.floor(Math.random() * charSet.length); randomString += charSet.substring(randomPoz,randomPoz+1); } return randomString; } function initSelect2_assunto_historico(){ start_inline_load(modal_content_historico); $.ajax({ url: 'https://limeira.iibr.com.br/classes/custom_historico/custom_historico_controller.php', type: 'post', dataType: 'html', data: { action : 'consultar_assunto' }, success: function(data){ data = JSON.parse(data.trim()); stop_inline_load(modal_content_historico); $('#select2_assunto_historico').select2({ data: data.data, escapeMarkup: function (markup) { return markup; }, placeholder: {id: '-1', text: 'Selecione o Assunto', }, allowClear: true, width: '100%', theme: "default", language: 'pt-BR', tags: false, tokenSeparators: [',', ' '], templateResult: formatDataResult, templateSelection: formatDataSelection }); $('#select2_assunto_historico').val(-1).trigger('change'); }, error: function(){ stop_inline_load(modal_content_historico); try{show_alert_page('danger','Erro ao se comunicar com o servidor','')}catch(e){alert('Erro ao se comunicar com o servidor')} } }); function formatDataResult (data) { 'use strict'; return data.text; } function formatDataSelection (data) { 'use strict'; master_id_assunto = data.id; return data.text; } } function row_style_table_historico_objetos(row, index) { var classes = ['active', 'success_table', 'info', 'warning_table', 'danger_table','table_cancelado']; var tipo = row.tipo; var id_assunto = row.id_assunto; var status = row.status; if (status == 'EDITADO'){ return { classes: classes[2] }; } if (status == 'EXCLU&Iacute;DO'){ return { classes: classes[4] }; } if (id_assunto == '4'){ return { classes: classes[3] }; } switch (tipo){ case 'Automática': return { classes: classes[0] }; break; default: return {}; break } return {}; } table_historico_objetos.on('open_detail_view',function(event,data,element){ element.html(''); element.css("min-height",'170px'); element.css("padding-left",'18px'); element.css("padding-right",'18px'); element.css("margin-bottom",'10px'); //element.css("overflow-y",'auto'); start_inline_load(element.parent(),undefined,'25px'); $.ajax({ url: 'https://limeira.iibr.com.br/classes/custom_historico/custom_historico_controller.php', type: 'post', dataType: 'html', data: { safe : data.safe, action : 'consultar_historico_detalhe' }, success: function(data){ stop_inline_load(element.parent()); element.html(data); }, error: function(e){ stop_inline_load(element.parent()); try{show_alert_page('danger','Erro ao se comunicar com o servidor','')}catch(e){alert('Erro ao se comunicar com o servidor')} } }); }); </script>]]>
7409 <![CDATA[<script> $(document).ready(function(){ init_custom_masks(); }) function init_custom_masks(){ init_custom_mask_cpfCnpj() init_custom_mask_inscricaoCadastral() init_custom_mask_percent() init_custom_mask_cep() } function init_custom_mask_cpfCnpj(){ var options = { onKeyPress: function (cpf, ev, el, op) { var masks = ['000.000.000-AA0', '00.000.000/0000-00']; construct_custom_mask('cpf_cnpj',(cpf.length > 14) ? masks[1] : masks[0], op); } } $(`[data-mask='cpf_cnpj']`).length > 11 ? construct_custom_mask('cpf_cnpj','00.000.000/0000-00', options) : construct_custom_mask('cpf_cnpj','000.000.000-AA#', options); } function init_custom_mask_inscricaoCadastral(){ construct_custom_mask('ic','0000-000-000') } function init_custom_mask_cep(){ construct_custom_mask('cep','00000-000') } function init_custom_mask_percent(){ construct_custom_mask('percent','##0,00%', {reverse: true}) } function construct_custom_mask(name, mask, options = undefined){ $(`[data-mask='${name}']`).mask(mask, options) } </script>]]>
7447 <![CDATA[<script> var content_pages = $('#content_pages'); var table_acesso_remoto = $('#table_acesso_remoto'); table_acesso_remoto.bootstrapTable(); var arr = [ [ {id : 'select2_usuario'}, {url : 'default'}, {action : 'buscar_usuario'}, {limit : 100}, {multiple : false}, {clear : true}, {placeholder : 'Nome ou CPF'}, ] ] initCustomFiltros(arr); function acessar_usuario_remoto(){ if (!valid_form(["#div_filtros"])){ return false; } start_inline_load(content_pages, 'Acessando usu�rio remotamente'); $.ajax({ url: 'https://limeira.iibr.com.br/sat/rotinas/sat_suporte_acesso_remoto.php', type: 'post', dataType: 'html', data: { action : 'acessar', cpf : $('#select2_usuario').val() }, success: function(data){ stop_inline_load(content_pages); data = JSON.parse(data.trim()); if (data.status){ show_alert_page('success',data.data,''); AcessarModulo(data.m,data.a); }else{ show_alert_page('warning',data.data,''); } },error: function(e){ stop_inline_load(content_pages); show_alert_page('danger','Falha ao se comunicar com o servidor',''); } }); } function finalizar_acesso_remoto(){ start_inline_load(content_pages, 'Finalizando acesso remoto'); $.ajax({ url: 'https://limeira.iibr.com.br/sat/rotinas/sat_suporte_acesso_remoto.php', type: 'post', dataType: 'html', data: { action : 'finalizar_acesso' }, success: function(data){ stop_inline_load(content_pages); data = JSON.parse(data.trim()); if (data.status){ show_alert_page('success',data.data,''); AcessarModulo(data.m,data.a); }else{ show_alert_page('warning',data.data,''); } },error: function(e){ stop_inline_load(content_pages); show_alert_page('danger','Falha ao se comunicar com o servidor',''); } }); } </script>]]>
7556 <![CDATA[<script> var data_custom_type_search = []; data_custom_type_search[0] = {id : '0', text : 'Igual' , isdefault : true}; data_custom_type_search[1] = {id : '1', text : 'Diferente' }; data_custom_type_search[2] = {id : '2', text : 'Maior' }; data_custom_type_search[3] = {id : '3', text : 'Menor' }; data_custom_type_search[4] = {id : '4', text : 'Incluir'}; data_custom_type_search[5] = {id : '5', text : 'N&atilde;o Incluir'}; function init_custom_type_search(){ var inputs = $('.custom_type_search'); inputs.each(function(index){ var input = $(this); init_input_custom_type_search(input); }); } function init_input_custom_type_search(input){ for (var i = 0; i < data_custom_type_search.length; i++){ var data = data_custom_type_search[i]; var isdefault = data.isdefault; var id = data.id; if (isdefault){ input.attr('data-action-id', id); } } init_action_input (input,data_custom_type_search,'Condi&ccedil;&atilde;o', 'glyphicon-filter'); input.on('btn_action_change', function(e, data){ }); input.css('z-index','0'); } function get_custom_condicao(input){ var input = $(input); var id = input.attr('data-action-id'); var value = ''; var name_element = input[0].nodeName; switch(name_element){ case 'SELECT': value = input.select2('data'); if (value.length <= 0){ value = ""; } break; default : value = input.val(); break; } if (value != undefined && value.length > 0){ var data = {type_arg: id, value : value}; }else{ data = undefined; } return data; } </script>]]>
7626 <![CDATA[<script> function valid_form(inputs){ return verify_inputs_require(inputs); } function verify_inputs_require( inputs ) { if ( !Array.isArray( inputs ) ) { inputs = [ inputs ]; } for ( var i = 0; i < inputs.length; i++ ) { var verify = verify_inputs_require_container( inputs[ i ] ); if ( !verify ) { return false; } } return true; } function verify_inputs_require_container( container ) { var container = $( container ); var inputs = container.find( $( '[data-required="true"]' ) ); var is_valid = true; inputs.each( function ( index ) { var input = $( this ); var nome_name = input[ 0 ].nodeName; var type = input[ 0 ].type; if (input.attr('disabled') == 'disabled'){ return; } if ( nome_name == 'SELECT' ) { var data = input.select2( 'data' ); if ( data.length < 1 ) { is_valid = false; input.addClass( 'input_is_not_valid' ); input.parent().children( '.select2' ).addClass( 'input_is_not_valid' ); verify_inputs_require_change( input ); verify_inputs_require_change( input.parent().children( '.select2' ) ); input.focus(); input.parent().children( '.select2' ).focus(); return false; } } else { var data = input.val(); if ( data.length < 1 ) { var data_id_date = input.attr( 'data-date-linked' ); var input_date = $( 'input[data-date-id="' + data_id_date + '"]' ); is_valid = false; input.addClass( 'input_is_not_valid' ); input_date.addClass( 'input_is_not_valid' ); verify_inputs_require_change( input ); verify_inputs_require_change( input_date ); input.focus(); input_date.focus(); return false; } } } ); return is_valid; } function verify_inputs_require_change( input ) { input.on( 'change', function () { remove_inputs_require(); } ) } function remove_inputs_require() { var inputs = $( '.input_is_not_valid' ); inputs.each( function ( index ) { $( this ).removeClass( 'input_is_not_valid' ); } ); } </script>]]>
7757 <![CDATA[<script> var modal_confirm_action = $('#modal_confirm_action'); var container_btns_modal_confirm_action = $('#container_btns_modal_confirm_action'); var modal_title_confirm_action = $('#modal_title_confirm_action'); var modal_message_confirm_action = $('#modal_message_confirm_action'); var btn_client_change = null; var data_modal_confirm_action = []; function start_modal_confirm(data,element_change){ create_modal_confirm_action(data,element_change); show_modal_confirm_action(); } function show_modal_confirm_action(){ modal_confirm_action.modal('show'); } function create_modal_confirm_action(data,element_change){ btn_client_change = element_change; var title = data.title; var message = data.message; if (title == undefined || title == null){ title = "Confirmação"; } modal_title_confirm_action.html(title); modal_message_confirm_action.html(message); var btns = ""; for (var i=0; i<data.length;i++){ var title = data[i].title; var type = data[i].type; if (type == undefined || type == null){ type = 'success'; } btns = btns + '<button type="button" data-index="'+i+'" class="btn btn-'+type+'" onClick="change_modal_confirm_action(this)">'+title+'</button>'; } data_modal_confirm_action = data; container_btns_modal_confirm_action.html(btns); } function change_modal_confirm_action(btn){ var btn = $(btn); var data_index = btn.attr('data-index'); var data = data_modal_confirm_action[data_index]; btn_client_change.trigger('change_confirm', data); modal_confirm_action.modal('hide'); } </script>]]>
7872 <![CDATA[<script> var modal_show_document = $('#modal_show_document'); var modal_show_document_title = $('#modal_show_document_title'); var container_show_document = $('#container_show_document'); var btn_show_document_new_tab = $('#btn_show_document_new_tab'); var btn_show_document_download = $('#btn_show_document_download'); var btn_show_document_print = $('#btn_show_document_print'); function show_document_modal(url,title){ var embed = '<iframe id="iframe_show_document_modal" style="border: none; width:100%; height:100%; position:relative; z-index: 4;" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" src="'+url+'"></iframe>'; container_show_document.html(embed); modal_show_document_title.html(title); btn_show_document_new_tab.attr('href',url); btn_show_document_download.attr('href',url); start_inline_load($('#iframe_show_document_modal').parent(),undefined, '250px') modal_show_document.modal('show'); } function show_document_certidao(safe){ $.ajax({ url: 'https://limeira.iibr.com.br/pub/rotinas/pub_certidao_valida.php', type: 'post', dataType: 'html', data: { action : 'consultar_certidao_safe', safe : safe }, success: function(data){ stop_inline_load(content_pages); data = JSON.parse(data.trim()); if (data.status){ show_document_modal(data.url,data.titulo); }else{ show_alert_page('warning',data.data,''); } },error: function(e){ stop_inline_load(content_pages); show_alert_page('danger','Falha ao se comunicar com o servidor',''); } }); } function print_document_modal(){ var PDF = document.getElementById('iframe_show_document_modal'); PDF.focus(); PDF.contentWindow.print(); } </script>]]>
7952 <![CDATA[<script> function custom_mask2(mask, value, key, keycode){ if (key == undefined || keycode == undefined) { return; }else if(key.length !== 1){ return; } const isLetter = ( (key >= "a" && key <= "z") || (key >= "A" && key <= "Z")); const isNumber = (key >= "0" && key <= "9"); if (!isLetter && !isNumber) { return } var mascara = '' var pointer = '' var ok = false switch(mask){ case 'cpf_cnpj': if(value.length + key.length < 15){ mascara = "000.000.000-XX" }else{ if(value.length + key.length == 15){ value = value.replace(/\./g, '').replace(/-/g,'').replace(/[^0-9]/g, "0") value = value.substr(0,2)+'.'+value.substr(2,3)+'.'+value.substr(5,3)+'/'+value.substr(8,3) } mascara = "00.000.000/0000-00" } break; case 'cep': mascara = "00000-000" break; default: mascara = mask break } while(ok == false){ var len_value = (value+key+pointer).length var len_mask = mascara.length var key_mask = mascara.substring(0,parseInt(len_value)).slice(-1) if(len_value > len_mask){ ok = true return } switch(key_mask){ case '0': //SOMENTE NÚMEROS ok = true if(!isNumber){ return } break; case 'A': //SOMENTE LETRAS ok = true if(!isLetter){ return } break; case 'X': //LETRAS E NUMEROS ok = true break; default: //SEPARADORES COMO PONTOS E BARRAS pointer += key_mask value += key_mask break; } } return value+key } function init_input2(){ $('input2').attr('contenteditable','true') $('input2').on('change paste keyup', function() { $(this).val($(this).text()) }) $('input2[mask2]').keypress(function(e) { e.preventDefault() $(this).text(custom_mask2($(this).attr("mask2"), $(this).text(), e.key, e.keyCode)) $(this).val($(this).text()) }) // $('input2[mask2]').keyup(function(e) { // if(e.keyCode == 46 || e.keyCode == 8) { // alert('Delete key released'); // } // }) $('input2').keypress(function(e) { if (e.keyCode == 13) { e.preventDefault() } }) $('input2[type=number]').bind('keypress', function(e) { if(isNumeric(e.key) == false){ e.preventDefault(); } }) $('input2[maxlength]').bind('keypress', function(e) { if(e.currentTarget.textContent.length >= $(this).attr("maxlength")){ e.preventDefault() } }) function isNumeric(n) { return !isNaN(parseFloat(n)) && isFinite(n); } } </script>]]>