2016-06-22 49 views
0

我搜索了文檔,沒有發現關於將FullCalendar資源與Google日曆中的事件源相關聯的任何信息。如何將FullCalendar資源與Google日曆中的EventSources相關聯?

這是相關代碼:

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]' 
      } 
     ], 

請幫助:-)

回答

0

在,你可以用任何東西任何事件相關聯,關於谷歌日曆中的特定位我真的不能回答,但是從你在這裏展示的是什麼(例如,將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方法中的方法中添加我的數據.....但它是相同的概念!

這有幫助嗎?我不清楚你實際上需要什麼幫助!

相關問題