如何将 FullCalendar 资源与 Google 日历中的 EventSources 相关联?
How Do I Associate FullCalendar Resource With EventSources from Google Calendar?
我搜索了文档,但没有找到有关将 FullCalendar 资源与来自 Google 日历的事件源相关联的内容。
这是相关代码:
resources: [
{ id: 'room01', title: 'Room 1' },
{ id: 'room02', title: 'Room 2' },
{ id: 'room03', title: 'Room 3' },
{ id: 'room04', title: 'Room 4' }
],
eventSources: [
{
id: 'e1',
resourceId: 'room01',
googleCalendarId: '[GOOGLE CALENDAR ID #1]'
},
{
id: 'e2',
resourceId: 'room02',
googleCalendarId: '[GOOGLE CALENDAR ID #2]'
}
],
求求你帮忙:-)
由于您可以将任何事件与任何事件相关联,关于 google 日历的具体部分我无法真正回答,但是根据您在此处显示的内容(即将 googleCalendarId 添加到您的事件中作为你有),我想你可能正在寻找的是下一块拼图,即 eventClick 部分?
对于你所拥有的,我认为这看起来像:
eventClick: function(calEvent) {
if (calEvent.googleCalendarId) {
var edit_url = "/url_to_get_to_the_google_calendar/" + calEvent.googleCalendarId + "/";
window.open(edit_url,"_self");
return false;
}
},
我使用与您在上面展示的相同的技术向我的事件添加各种关联,然后简单地添加 eventClick 代码(这将简单地按照您上面的代码在您的日历页面条目中进行)- 除了我将我的数据添加到调度程序中的方法 views.py 方法.....但这是相同的概念!
有帮助吗?我不清楚您实际上需要什么帮助!
我搜索了文档,但没有找到有关将 FullCalendar 资源与来自 Google 日历的事件源相关联的内容。
这是相关代码:
resources: [
{ id: 'room01', title: 'Room 1' },
{ id: 'room02', title: 'Room 2' },
{ id: 'room03', title: 'Room 3' },
{ id: 'room04', title: 'Room 4' }
],
eventSources: [
{
id: 'e1',
resourceId: 'room01',
googleCalendarId: '[GOOGLE CALENDAR ID #1]'
},
{
id: 'e2',
resourceId: 'room02',
googleCalendarId: '[GOOGLE CALENDAR ID #2]'
}
],
求求你帮忙:-)
由于您可以将任何事件与任何事件相关联,关于 google 日历的具体部分我无法真正回答,但是根据您在此处显示的内容(即将 googleCalendarId 添加到您的事件中作为你有),我想你可能正在寻找的是下一块拼图,即 eventClick 部分?
对于你所拥有的,我认为这看起来像:
eventClick: function(calEvent) {
if (calEvent.googleCalendarId) {
var edit_url = "/url_to_get_to_the_google_calendar/" + calEvent.googleCalendarId + "/";
window.open(edit_url,"_self");
return false;
}
},
我使用与您在上面展示的相同的技术向我的事件添加各种关联,然后简单地添加 eventClick 代码(这将简单地按照您上面的代码在您的日历页面条目中进行)- 除了我将我的数据添加到调度程序中的方法 views.py 方法.....但这是相同的概念!
有帮助吗?我不清楚您实际上需要什么帮助!