/**
 * blog and plan 的左侧树形列表参数 
 * 
 * @link      http://www.u-bo.com
 * @copyright 南京友博网络科技有限公司 
 * @license   http://www.u-bo.com/license/ 
 * 
 * @author HuLimin http://blog.u-bo.com
 * @since 0.1
 */

var setting = {
    async: {
        enable: true,
        url: getTreeDataUrl,
        type: "get"
    },
    data: {
        simpleData: {
            enable: true,
            idKey: "dept_id",
            pIdKey: "parent_id"
        }
    },
    view: {
        showIcon: false,
        selectedMulti: false,
        fontCss: {
            color: "#005bb8"
        }
    },
    callback: {
        onClick: zTreeOnClick
    },
    editable: true // 开启可编辑
}
$(document).ready(function() {
    $.fn.zTree.init($("#tree"), setting);
});

function zTreeOnClick(event, treeId, treeNode) {
    $('#calendarTitle').html(treeNode.name);
    $("#query_value").val(treeNode.user_ids);
    $('#calendar').fullCalendar('refetchEvents');
}


