1$(document).ready(function() { 2 $('#divPoliticaPrivacidade .aceitar').on('click', function(){ 3 localStorage.setItem("politicaAceita", true); 4 $('#divPoliticaPrivacidade').hide(); 5 }); 6 7 //politica de privacidade 8 politicaPrivacidade = $('#divPoliticaPrivacidade'); 9 if (politicaPrivacidade.html()) { 10 if (localStorage.getItem("politicaAceita")) { 11 politicaPrivacidade.hide(); 12 } 13 } 14 15 var _el = jQuery(".ajaxPopup"); 16 if (_el.length > 0) { 17 if (typeof(jQuery.magnificPopup) == "undefined") { 18 loadScript(plugin_path + 'magnific-popup/jquery.magnific-popup.min.js', function() { 19 jQuery("#magnificPopupCSS").remove(); 20 jQuery("head").append( 21 '<link id="magnificPopupCSS" href="'+plugin_path+ 22 '/magnific-popup/magnific-popup.css" rel="stylesheet" type="text/css" />' 23 ); 24 $('.ajaxPopup').magnificPopup({ 25 type: 'iframe', 26 alignTop: false, 27 overflowY: 'scroll', 28 closeOnBgClick: false 29 }); 30 }); 31 } else { 32 $('.ajaxPopup').magnificPopup({ 33 type: 'iframe', 34 alignTop: false, 35 overflowY: 'scroll', 36 closeOnBgClick: false 37 }); 38 } 39 } 40 41 //mensagem ao fazer o logout 42 $('.linkSair').on('click', function() { 43 bootstrapModalConfirm("Você tem certeza que deseja sair?", function() { 44 window.location.href = baseurl+'/filiado/index/logout'; 45 }); 46 return false; 47 }); 48 49 $("#owl-documentos").owlCarousel({ 50 items : 4, 51 //Navigation 52 navigation : true, 53 navigationText : ["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"], 54 rewindNav : true, 55 scrollPerPage : false, 56 //Pagination 57 pagination : false, 58 paginationNumbers: false, 59 }); 60 61 $("#owl-banners").owlCarousel({ 62 items : 3, 63 autoPlay : true, 64 stopOnHover : true, 65 //Navigation 66 navigation : false, 67 navigationText : null, 68 rewindNav : true, 69 scrollPerPage : false, 70 //Pagination 71 pagination : true, 72 paginationNumbers: false, 73 }); 74 75 $('.modalOpen').on('click', function(){ 76 url = $(this).attr('href'); 77 buildDialog('', url, null, true); 78 return false; 79 }); 80 81 loadScript(plugin_path+'bootstrap.datepicker/js/bootstrap-datepicker.min.js', function() { 82 loadScript(plugin_path+'bootstrap.datepicker/locales/bootstrap-datepicker.pt-BR.min.js', function() { 83 $('.datepicker-agenda').each(function() { 84 var _t = jQuery(this); 85 var _lang = _t.attr('data-lang') || 'pt-BR'; 86 tooltipTitle = ''; 87 url = _t.attr('data-url'); 88 _mes = _t.attr('data-mes'); 89 _ano = _t.attr('data-ano'); 90 _menor_data = _t.attr('data-menor_data'); 91 _maior_data = _t.attr('data-maior_data'); 92 $(this).datepicker({ 93 language: _lang, 94 //defaultViewDate: {year :_ano, month: _mes}, 95 format: "dd/mm/yyyy", 96 viewMode: "months", 97 startView: "months", 98 minViewMode: "months", 99 todayHighlight: true, 100 startDate: _menor_data, 101 endDate: _maior_data, 102 beforeShowMonth: function(date) { 103 //highlightMonth(date); 104 } 105 }).on('show',function(e) { 106 //highlightMonth(); 107 tooltipTitle = $('.datepicker-agenda').data('original-title'); 108 $('.datepicker-agenda').removeAttr('data-original-title'); 109 $(this).datepicker("update", '1/'+_mes+'/'+_ano); 110 }).on('hide',function(event) { 111 $('.datepicker-agenda').attr('data-original-title', tooltipTitle); 112 }).on('changeDate', function(e) { 113 data = e.date; 114 mes = data.getMonth() + 1; 115 ano = data.getFullYear(); 116 url += '/mes/'+mes+'/ano/'+ano; 117 window.location.href = url; 118 $(this).datepicker('hide'); 119 }); 120 }); 121 }); 122 }); 123 124 $('.linkPopup').click(function () { 125 href = $(this).attr('href'); 126 title = $(this).attr('title'); 127 abrePopUp(href, title, 800, 600, 0, 0); 128 return false; 129 }); 130}); 131 132function getWindowHeight() { 133 return window.innerHeight && 134 window.innerHeight > 0 ? window.innerHeight : 135 document.documentElement.clientHeight && 136 document.documentElement.clientHeight > 0 ? document.documentElement.clientHeight : 137 document.body.clientHeight && 138 document.body.clientHeight > 0 ? document.body.clientHeight : -1; 139} 140 141function getWindowWidth() { 142 return window.innerWidth && 143 window.innerWidth > 0 ? window.innerWidth : 144 document.documentElement.clientWidth && 145 document.documentElement.clientWidth > 0 ? document.documentElement.clientWidth : 146 document.body.clientWidth && 147 document.body.clientWidth > 0 ? document.body.clientWidth : -1; 148} 149 150function buildDialog(titulo, url, oncloseFunction, closeButton) { 151 height = getWindowHeight()*0.8; 152 html = '<div id="dialogModal" class="modal fade" tabindex="-1" aria-hidden="true" '; 153 html+= 'style="display: none;">'; 154 html+= ' <div class="modal-dialog modal-lg">'; 155 html+= ' <div class="modal-content">'; 156 html+= ' <div class="modal-header">'; 157 if (closeButton) { 158 html+= ' <button class="close" data-dismiss="modal"><span>Ã</span></button>'; 159 } 160 html+= ' <span class="modal-title" id="myLargeModalLabel">'+titulo+'</span>';
161 html+= ' </div>'; 162 html += ' <div class="modal-body embed-responsive" style="height:'+height+'px">'; 163 html+= ' <iframe class="embed-responsive-item" src="'+url+'/thickbox/true"></iframe>'; 164 html+= ' </div>'; 165 html+= ' </div>'; 166 html+= ' </div>'; 167 html+= '</div>'; 168 169 $('body').prepend(html); 170 $('#dialogModal').modal({backdrop:'static', keyboard: false}); 171 $('#dialogModal').modal('show'); 172 $('#dialogModal').on('hidden.bs.modal', function() { 173 if (oncloseFunction != undefined) { 174 eval(oncloseFunction); 175 } 176 $('#dialogModal').remove(); 177 }); 178} 179 180/* 181 * tipo = success ou error 182 * mensagem = mensagem para exibição 183 * duração = duração tem em ms que tela ficara com o bloqueada, padrao 2000 184 * redirecionamento = url para redirecionamento 185*/ 186showingMessagemBlockUi = false; 187function mensagemBlockUI(tipo, mensagem, duracao, redirecionamento, parentRedir) { 188 /** Define classes da mensssage de acordo com o tipo da mensagem **/ 189 if (!showingMessagemBlockUi) { 190 if (tipo == 'success') { 191 modalClass = 'modal-success'; 192 iconClass = 'fa-check-circle'; 193 } 194 195 if (tipo == 'error') { 196 modalClass = 'modal-danger'; 197 iconClass = 'fa-times-circle'; 198 } 199 200 if (tipo == 'notice') { 201 modalClass = 'modal-warning'; 202 iconClass = 'fa-warning'; 203 } 204 205 if (tipo == 'info') { 206 modalClass = 'modal-info'; 207 iconClass = 'fa-info-circle'; 208 } 209 210 /** Cria html da mensagem**/ 211 html = '<div id="mensagem-blockUI" class="modal modal-alert '+modalClass; 212 html+=' fade" style="display: none;" aria-hidden="true">'; 213 html+= ' <div class="modal-dialog">'; 214 html+= ' <div class="modal-content">'; 215 html+= ' <div class="modal-header"><i class="fa '+iconClass+'"></i></div>'; 216 html+= ' <div class="modal-body">'+mensagem+'</div>'; 217 html+= ' <div class="modal-footer">'; 218 html+= ' <button data-dismiss="modal" class="btn btn-success" type="button">OK</button>';
219 html+= ' </div>'; 220 html+= ' </div>'; 221 html+= ' </div>'; 222 html+= '</div>'; 223 224 //remove mensagem pre-existente 225 $('#mensagem-blockUI').remove(); 226 227 //inclui mensagem na página 228 $("body").append(html); 229 230 //exibe a mensagem na tela 231 $('#mensagem-blockUI').modal('show'); 232 showingMessagemBlockUi = true; 233 234 //após o limite definido pela variavel time a mensagem desaparece 235 //redireciona para a url definada após exibir a mensagem 236 timeoutMessage = setTimeout(function() { 237 $('#mensagem-blockUI').modal('hide'); 238 }, duracao); 239 240 //acões a serem relizadas após a mensagem fechar 241 $('#mensagem-blockUI').on('hidden.bs.modal', function () { 242 showingMessagemBlockUi = false; 243 clearTimeout(timeoutMessage) 244 if(redirecionamento != '') { 245 window.location = redirecionamento; 246 } 247 248 if (parentRedir != undefined && parentRedir != '') { 249 parent.window.location = redirecionamento; 250 } 251 }); 252 } 253} 254 255function bootstrapModalConfirm(mensagem, confirmFunction, cancelFunction) { 256 html = '<div id="confirmModal" class="modal modal-alert fade modal-question" '; 257 html += 'style="display: none;" aria-hidden="true">'; 258 html += ' <div class="modal-dialog">'; 259 html += ' <div class="modal-content">'; 260 html += ' <div class="modal-header"><i class="fa fa-question-circle"></i></div>'; 261 html += ' <div class="modal-body">'+mensagem+'</div>'; 262 html += ' <div class="modal-footer">'; 263 html += ' <button data-dismiss="modal" class="confirm btn btn-success" type="button">'; 264 html += ' Sim</button>'; 265 html += ' <button data-dismiss="modal" class="cancel btn btn-danger" type="button">'; 266 html += ' Não</button>'; 267 html += ' </div>'; 268 html += ' </div>';
269 html += ' </div>'; 270 html += ' </div>'; 271 html += ' </div>'; 272 html += '</div>'; 273 274 $('body').prepend(html); 275 $('#confirmModal').modal({"backdrop": "static"}); 276 277 if (confirmFunction) { 278 $('#confirmModal .confirm').on('click', confirmFunction); 279 } 280 281 if (cancelFunction) { 282 $('#confirmModal .cancel').on('click', cancelFunction); 283 } 284} 285 286function fechaMagnificPopup() { 287 parent.location.reload(); 288} 289 290/** curriculo **/ 291$(function() { 292 $('.excluirCurriculo').click(function(){ 293 excluirCurriculo(); 294 return false; 295 }); 296 297 $('#vi_anexar_foto_curriculo').change(function() { 298 $.post( 299 baseurl+'/filiado/curriculo/anexar-foto-curriculo', 300 {anexar:$(this).is(":checked")} 301 ); 302 }); 303 304 $('#vi_disponibilizar_curriculo').change(function() { 305 $.post( 306 baseurl+'/filiado/curriculo/disponibilizar-curriculo', 307 {disponibilizar:$(this).is(":checked")} 308 ); 309 }); 310 311 $('#vi_receber_vagas_emprego').change(function() { 312 $.post( 313 baseurl+'/filiado/curriculo/receber-vagas', 314 {receber:$(this).is(":checked")} 315 ); 316 }); 317 318 $('.vi_id_funcao').change(function() { 319 $.post( 320 baseurl+'/filiado/curriculo/alterar-funcao', 321 {funcao:$(this).attr('data-id'), vincular:$(this).is(":checked")} 322 ); 323 }); 324}); 325 326function excluirCurriculo() { 327 bootstrapModalConfirm( 328 "Você tem certeza que deseja excluir seu currÃculo?", 329 function() { 330 $.post(baseurl+'/filiado/curriculo/excluir-curriculo', {}, function(data) { 331 if (data == 'success') { 332 mensagemBlockUI( 333 'success', 334 'CurrÃculo excluÃdo com sucesso!', 335 3000, 336 baseurl+'/filiado/curriculo' 337 ); 338 } else { 339 mensagemBlockUI('error', 'Erro ao excluir o currÃculo!', 3000, ''); 340 } 341 }) 342 }); 343} 344 345$(function() { 346 $("#enviar_curriculo").click(function() { 347 bootstrapModalConfirm("Você tem certeza que deseja enviar seu currÃculo para a empresa?", function() { 348 enviarEmailEmpresa(); 349 }); 350 }); 351}); 352 353/** vaga de emprego **/ 354function enviarEmailEmpresa() { 355 var botaoEnviar = $("#enviar_curriculo"); 356 showLoad('#content .panel-body', 8, 'Enviando curriculo', 'rgba(255,255,255,0.95)', '#004165'); 357 id = $("#enviar_curriculo").attr('data-id'); 358 botaoEnviar.attr('disabled', 'disabled'); 359 $.post(baseurl+"/filiado/"+controller+"/enviar-email-json/", {id:id}, function(data) { 360 try { 361 $('#content .panel-body .spinkit').remove(); 362 var data2 = eval("("+data+")"); 363 if(data2 == 'success') { 364 mensagemBlockUI( 365 'success', 366 'Seu currÃculo foi enviado para a empresa.',
367 5000, 368 window.location 369 ); 370 } else if(data2 == 'vaga') { 371 mensagemBlockUI('notice', 'Vaga não disponÃvel!', 5000, ''); 372 } else if(data2 == 'enviou') { 373 mensagemBlockUI( 374 'notice', 375 'Você já enviou seu currÃculo para esta vaga!', 376 5000, 377 window.location 378 ); 379 } else if (data2 == 'curriculo') { 380 mensagemBlockUI( 381 'notice', 382 'à necessário infomar seu currÃculo PDF ou seu perfÃl no Linkedin!', 383 5000, 384 window.location 385 ); 386 } else { 387 mensagemBlockUI( 388 'error', 389 'Erro ao enviar currÃculo!<br/>Tente novamente mais tarde.', 390 5000, 391 '' 392 ); 393 } 394 } catch(err) { 395 mensagemBlockUI( 396 'error', 397 'Erro ao enviar currÃculo!<br/>Tente novamente mais tarde.', 398 5000, 399 '' 400 ); 401 } 402 botaoEnviar.removeAttr('disabled'); 403 }); 404} 405 406function showLoad(parent, tipo, texto, fundo, cor) { 407 divClass = 'spinner-'+tipo; 408 backgroundDiv = 'none'; 409 numSubdivs = 2; 410 411 switch(tipo) { 412 case 1: 413 backgroundDiv = cor; 414 numSubdivs = 0; 415 break; 416 case 2: 417 subclass = "double-bounce"; 418 break; 419 case 3: 420 numSubdivs = 5; 421 subclass = "rect"; 422 break; 423 case 4: 424 subclass = "cube"; 425 break; 426 case 5: 427 numSubdivs = 0; 428 backgroundDiv = cor; 429 break; 430 case 6: 431 subclass = "dot"; 432 break; 433 case 7: 434 numSubdivs = 3; 435 subclass = "bounce"; 436 break; 437 case 8: 438 divClass = "sk-circle"; 439 numSubdivs = 12; 440 subclass = "sk-child sk-circle"; 441 break; 442 case 9: 443 divClass = "sk-cube-grid"; 444 subclass = "sk-cube sk-cube"; 445 numSubdivs = 9; 446 break; 447 case 10: 448 divClass = "sk-fading-circle"; 449 subclass = "sk-circle sk-circle"; 450 numSubdivs = 12; 451 break; 452 case 11: 453 divClass = "sk-folding-cube"; 454 subclass = "sk-cube sk-cube"; 455 numSubdivs = 4; 456 break; 457 } 458 459 html = '<div class="spinkit overlay-loader" style="background:'+fundo+'">' 460 + '<span class="texto" style="color:'+cor+'">'+texto+'</span>' 461 +' <div class="'+divClass+'" style="background-color:'+backgroundDiv+'">'; 462 if (numSubdivs) { 463 for (i = 0; i < numSubdivs; i++) { 464 html += '<div class="'+subclass+(i+1)+'" style="background-color:'+cor+'"></div>'; 465 } 466 } 467 html += '</div>' 468 +'</div>'; 469 470 $(parent).prepend(html); 471}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.