$(document).ready(function () {
    $(function () {
        $('#userRegistredDate').daterangepicker({
            arrows: false
        });
    });
    //check box validation to update status
    $(".update_btn_table").click(function () {
        var changeStatus = $('#changeStatus').val();
        if ($(".ListAll:checked").size() == 0) {
            jAlert(msgSelectItem);
            return false;
        } else if (changeStatus == "") {
            jAlert(lblSelectAction);
            return false;
        }
        if (changeStatus == 'Deleted') {
            jConfirm(msgConfirmDelete, 'Alert', function (r) {
                if (r == true) {
                    $('#formUsers').submit();
                }
            });
        } else {
            return true;
        }
        return false;
    });
    $("[task=delete]").click(function () {
        var thehref = $(this).attr("rel");
        jConfirm(msgConfirmDelete, 'Alert', function (r) {
            if (r == true) {
                window.location.href = GLOBAL_BASE_PATH + thehref;
                return true;
            } else
                return false;
        });
    })
    //check box validation to update status
    $("#submitSearch").click(function () {
        /*if ($.trim($('#userFullName').val()) == "" && $.trim($('#userRegistredDate').val()) == "" && $.trim($('#userType').val()) == "" && $.trim($('#userEmailID').val()) == "" && $.trim($('#userReferralID').val()) == ""&& $.trim($('#userGroupID').val()) == ""&& $.trim($('#userPhone').val()) == "") {
            jAlert(msgSelectSearchCriteria);
            return false;
        }*/
        return true;
    });
});