﻿$(document).ready(function () {

    $("#rblTipoAtendimento input:radio").change(function () {

        if ($("#txtObservacao").val() != "")
            $('#btnEnviarSolucoes').attr("disabled", false);
        else
            $('#btnEnviarSolucoes').attr("disabled", true);

        $(".btnRegistro").show();
        $("#txtObservacao").focus();
    });

    $("#txtObservacao").keyup(function () {
        if ($(this).val() == '') {
            $('#btnEnviarSolucoes').attr("disabled", true);
        } else {
            $('#btnEnviarSolucoes').attr("disabled", false);
        }
    });

    $("#txtProtocolo").keyup(function () {
        //limpa o campo de fone
        $(this).prev().prev().prev().val('');
        //limpa o campo de email
        $(this).prev().prev().prev().prev().prev().prev().val('');
    });

    //Função utilizada para bloquear o ENTER no campo de LOC da tela de atendimento
    $('#txtLoc').keypress(function (event) {
        if (event.keyCode == 13 || event.charCode == 13) {
            return false;
        }
    });

});
