1$(document).ready(function() { 2 //$("[data-toggle=tooltip]").tooltip(); dá bug com as mensagens de erro e focus() 3 $("#fNewsFone").mask("(99) 9-9999-9999"); 4 $("#novo_alert_fecha").click( function() { 5 $("#novo_alert").hide( "slow" ); 6 }); 7 $('#modal_news').on('shown', function () { 8 $("#fNewsNome").focus(); 9 }); 10 $(".btn_modal_news").click( function() { 11 $("#novo_alert").hide(); 12 $("#fNewsNome").val(""); 13 $("#fNewsMail").val(""); 14 $("#fNewsFone").val(""); 15 $("#fNewsCida").val(""); 16 $("#fNewsPais").val(""); 17 $("#fNewsCod").val(""); 18 $("#sidePolitica").prop( "checked", false ); 19 news_muda(); 20 $("#modal_news").modal("show"); 21 }); 22 23 $("#btn_news_confirma").click( function () { 24 var nome = $("#fNewsNome").val(); 25 var mail = $("#fNewsMail").val(); 26 var fone = $("#fNewsFone").val(); 27 var cida = $("#fNewsCida").val(); 28 var pais = $("#fNewsPais").val(); 29 var cod = $("#fNewsCod").val(); 30 var myPolitica = $("#sidePolitica"); 31 var politica = myPolitica.filter(":checked").val(); 32 $.ajax({ 33 url: "/newsletter-confirma/", 34 type: "post", 35 data: { nome: nome, 36 mail: mail, 37 fone: fone, 38 cida: cida, 39 pais: pais, 40 cod: cod, 41 politica: politica }, 42 async: true, 43 beforeSend: function(){ 44 $("#btn_news_confirma").hide(); 45 $("#btn_news_confirma_loading").show(); 46 }, 47 success: function(data){ 48 resultado = $.trim(data); 49 vetor = resultado.split( "<n;>" ); 50 switch( vetor[0] ){ 51 case '0': 52 $("#btn_news_confirma").show(); 53 $("#btn_news_confirma_loading").hide(); 54 mostra_erro( "Ocorreu um erro inesperado. Por favor tente novamente mais tarde." ); 55 break; 56 case '1': 57 $("#btn_news_confirma").show(); 58 $("#btn_news_confirma_loading").hide(); 59 mostra_erro( vetor[1] ); 60 $(vetor[2]).focus(); 61 break; 62 case 'ok': 63 $("#btn_news_confirma").show(); 64 $("#btn_news_confirma_loading").hide(); 65 $("#modal_news").modal("hide"); 66 proluv_alert( "Sucesso", "<div class='alert alert-success'>O seu cadastro foi confirmado com sucesso. Agradecemos o seu interesse em receber a nossa newsletter.</div>", "Fechar" ); 67 break; 68 default: 69 alert( data ); 70 $("#btn_news_confirma").show(); 71 $("#btn_news_confirma_loading").hide(); 72 break; 73 } 74 }, 75 error:function(){ 76 $("#btn_news_confirma").show(); 77 $("#btn_news_confirma_loading").hide(); 78 mostra_erro( "Ocorreu um erro inesperado. Por favor tente novamente mais tarde." ); 79 } 80 }); 81 }); 82}); 83 84function mostra_erro( mensa ){ 85 $("#novo_alert_erro").html( mensa ); 86 $("#novo_alert").hide(); 87 $("#novo_alert").show( "slow" ); 88} 89 90function news_muda(){ 91 var d = new Date(); 92 $("#news_captcha").prop("src", "/funcoes/ret_captcha.php?"+d.getTime()); 93}
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.