ws.subscribe('updateUserPresence', null, function (data) {

    if (data.jabberPresence !== undefined) {
        $('#jabberStatus_' + data.id).find(".icon-comment").removeClass("in").addClass("fade out");
    }
    if (data.phonePresence !== undefined) {
        $('#jabberStatus_' + data.id).find(".icon-phone").removeClass("in").addClass("fade out");
    }

    setTimeout(function () {
        $('#jabberStatus_' + data.id).monitorItem(data);
        if (data.jabberPresence !== undefined) {
            $('#jabberStatus_' + data.id).find(".icon-comment").removeClass("out").addClass("in");
        }
        if (data.phonePresence !== undefined) {
            $('#jabberStatus_' + data.id).find(".icon-phone").removeClass("out").addClass("in");
        }
    }, 200);
});

$("#content").on("click", '.logginButton', function ()
{
    var member = $(this).data("member");
    var queue = $(this).data("queue");
    var url = $(this).data("url");
    console.log(queue)
    //toggleAgentLoginIds;
    /*
    $.ajax({
        url: url,
        dataType: "json",
        type: "POST",
        data: {
            memberId: member,
            queueId: queue
        },
        success: function (data) {
            $("#Queue-general-data-grid").yiiGridView("update");
            $("#QueueMonitor-grid").yiiGridView("update");
        },
        error: function (error) {
            console.log(error);
        }
    });
    */
});
