1form_start($("#acesso_form")); 2 3form_focus($("#acesso_form")); 4 5$("#cliente_email").bind("keydown", function(e) { 6 if (e.keyCode == 13) 7 { 8 $("#cliente_senha").focus(); 9 e.preventDefault(); 10 return(false); 11 } 12}); 13 14$("#cliente_senha").bind("keydown", function(e) { 15 if (e.keyCode == 13) 16 { 17 if ((required($("#cliente_email").toVal())) && (required($("#cliente_senha").toVal()))) 18 { 19 $("button[data-action=\"acesso\"][type=\"button\"]").trigger("click"); 20 } 21 else 22 { 23 $("#cliente_email").focus(); 24 } 25 e.preventDefault(); 26 return(false); 27 } 28}); 29 30$("button[data-action=\"acesso\"][type=\"button\"]").bind("click", function(e) { 31 32 form_before_validate($("#acesso_form")); 33 34 if (!form_validate($("#cliente_email"), valid($("#cliente_email").toVal(), true, "valid_email", 100, "Email"))) 35 { 36 return(false); 37 } 38 if (!form_validate($("#cliente_senha"), valid($("#cliente_senha").toVal(), true, "valid_text", 20, "Senha"))) 39 { 40 return(false); 41 } 42 43 var input = { 44 "cliente_email" : $("#cliente_email").toVal(), 45 "cliente_senha" : $("#cliente_senha").toVal(), 46 "lembrar_cliente_email" : $("#lembrar_cliente_email").toBit() 47 }; 48 49 form_before_submit($("#acesso_form")); 50 51 $.ajax({ 52 type: "POST", 53 url: site_url + "/acesso/acesso/", 54 data: input, 55 dataType: "json", 56 success: function (data, textStatus, jqXHR) 57 { 58 form_after_submit($("#acesso_form"), true); 59 if (data["error"]) 60 { 61 form_error($("#acesso_form"), data["message"]); 62 } 63 else 64 { 65 form_success($("#acesso_form"), data["message"]); 66 if (data["data"]["redirect"] == null) 67 { 68 redirect(site_url + "/inicio/"); 69 } 70 else 71 { 72 redirect(data["data"]["redirect"]); 73 } 74 } 75 }, 76 error: function (jqXHR, textStatus, errorThrown) 77 { 78 form_after_submit($("#acesso_form"), true); 79 form_error($("#acesso_form"), error.general); 80 } 81 }); 82 83});
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.