Javascript fullCalendar动态事件单击行为

Javascript fullCalendar动态事件单击行为,javascript,php,jquery,fullcalendar,Javascript,Php,Jquery,Fullcalendar,我正在为我的事件源使用带有2个JSON提要的fullCalendar。我使用eventClick在单击事件时打开一个模式窗口。但是,我只需要第一个事件源(json events.php)的模式窗口。我希望第二个源(json paidstaff.php)中的所有事件都是静态框,没有eventClick函数。有没有办法只为一个源指定eventClick 我的js目前 $('#calendar').fullCalendar({ editable: false, timeFormat: 'H(:mm)

我正在为我的事件源使用带有2个JSON提要的fullCalendar。我使用eventClick在单击事件时打开一个模式窗口。但是,我只需要第一个事件源(json events.php)的模式窗口。我希望第二个源(json paidstaff.php)中的所有事件都是静态框,没有eventClick函数。有没有办法只为一个源指定eventClick

我的js目前

$('#calendar').fullCalendar({

editable: false,
timeFormat: 'H(:mm)', // uppercase H for 24-hour clock
eventSources: [
    // your event source
    {
        url: 'json-events.php?uid=$bbuserinfo[userid]'
    },

    // any other sources...
    {
        url: 'json-paidstaff.php?uid=$bbuserinfo[userid]',
        color: 'black', // a non-ajax option
        textColor: 'white' // a non-ajax option
    }

],

eventRender: function (event, element) {
    element.find('.fc-event-title').append("<br/>" + event.namescreds);
},

loading: function (bool) {
    if (bool) $.blockUI();
    else $.unblockUI();
},

eventClick: function (calEvent, jsEvent, view) {
    $.blockUI();
    Boxy.load('ajax.php?uid=$bbuserinfo[userid]&id=' + calEvent.id, {
        modal: true,
        closeable: true,
        afterShow: ($.unblockUI())
    });
  }
});
$(“#日历”).fullCalendar({
可编辑:false,
timeFormat:'H(:mm)//24小时时钟的大写字母H
事件来源:[
//您的事件源
{
url:'json events.php?uid=$bbuserinfo[userid]'
},
//任何其他来源。。。
{
url:'json paidstaff.php?uid=$bbuserinfo[userid]',
颜色:“黑色”//非ajax选项
textColor:'white'//非ajax选项
}
],
eventRender:函数(事件,元素){
元素.find('.fc event title').append(“
”+event.namescreds); }, 加载:函数(bool){ if(bool)$.blockUI(); else$.unbui(); }, eventClick:函数(calEvent、jsEvent、view){ $.blockUI(); load('ajax.php?uid=$bbuserinfo[userid]&id='+calEvent.id{ 莫代尔:是的, 可接近的:是的, 余波:($.unbui()) }); } });
如文档中所示,您可以拥有自己的非标准字段,我们可以在其中存储任意信息,在本例中,我们可以存储事件所属的位置

$('#calendar').fullCalendar({
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
    },
    editable: true,
    events: [{
        "id": 1,
            "title": "Hello World",
            "start": "Wed, 15 Jan 2014 09:00:00",
            "end": "Wed, 15 Jan 2014 10:00:00",
        "belongsto" : "list 1"

    }, {
        "id": 2,
            "title": "Good Afternoon",
            "start": "Wed, 23 Jan 2014 13:00:00",
            "end": "Wed, 23 Jan 2014 17:00:00",
        "belongsto" : "list 2"
    }],
     eventClick: function(calEvent, jsEvent, view) {
         alert(calEvent.belongsto);
         if(calEvent.belongsto === "list 1") {
               //do something.
         }
    }
});