/*
    File: voorb_user_callback.js
*/
var callbackFunctions_user =
    {   name: "user",
        createOptionList: function _createOptionList(data, statusInfo, params)
            {
                var listname = params.optionlist;
                var apiname  = params.apiname;
                $("#"+listname).empty();
                $.each( data[apiname]
                      , function (index, value)
                        {
                            apirecord = data[apiname][index];
                            $("#"+listname).append("<option value="+ apirecord.id +">" + apirecord.code + "</option>");
                        }
                      );
            },

        showAppointmentNr: function _showAppointmentNr(data, statusInfo, params)
            {
                var msg = "Afspraak gemaakt met nummer: "+ data.appointment.id;
                $("#Result").text(msg);
                $("#btnSubmit").attr("disabled", true);
            },

        b: function _ennuverder2(data, statusInfo, params)
           {
                var msg = $("#Result").text();
                msg = msg + "andere functie";
                $("#Result").text(msg);
           }
    };
