开发者

Using fullcalendar with javascript, how to modify a parameters list and refetch?

I'm using fullcalendar to show events to be filled.

In my team, I have 2 people. Mike and Claire. I'm the Boss.

If Mike or Claire log in to my page they can only see their own Events. If I log to t开发者_如何学Gohe same app I can choose the events to see: Mike's, Claire's, all of them or only mine.

To do that I'll choose the correct value from a Combobox (Mike's, Claire's, Mine, All of them). After I change that combovalue I have to refetch events according to my selected option.

Actually my fullcalendar is configured with:

events: "../controller.php",
dparams : {
    "pg":"getAgendaCalendarView",
    "profile": "undefined",
    "query": "*"
},

And under my combo I have something like:

listeners: {
'change' : function(objThis, newValue, oldValue){
    $('#cw_tbcalendar').fullCalendar('refetchEvents');
}

My main question is, how can I modify the parameters list to show my selected value?


Have you considered using ExtJS's calender? (tagged with extjs)

In reply to the question, might this be your solution?

var config = {
    events: "controller.php",
    dparams: {
        "pg": "getAgendaCalendarView",
        "profile": "undefined",
        "query": "*"
    }
};
$('#calendar').fullCalendar(config);

$('#my_combo').change(function() {
    config.dparams.query = $(this).value();
    $('#calendar').fullCalendar(config);
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜