カレンダーでは、ready.js ファイルのイベント セクションに json 配列をハードコーディングした場合にのみ、イベントを取得できます。URL を使用すると表示されません。
イベントのある URL を参照すると、json 配列が表示されます。
配列内のサンプル イベントを次に示します。
[{"id":10,"title":"Utah REIA Monthly Meeting--Your Investor Toolbox provided with the New Website Launch","start":"2015-11-24T18:30:00-0700","end":"2015-11-24T20:30:00-0700","allDay":false,"url":"\/events\/view\/10","details":"\u003Cp\u003E\u003Cspan\u003EAre you a real estate investor who is looking for\u003C\/span\u003E\u003C\/p\u003E\n\u003Col\u003E\n\t\u003Cli\u003EMore education\u003C\/li\u003E\n\t\u003Cli\u003EIndividuals to connect and network with\u003C\/li\u003E\n\t\u003Cli\u003EDiscounts and special offers from retailers you frequent most\u003C\/li\u003E\n\u003C\/ol\u003E\n\n\u003Cp\u003E\u003Cspan\u003EThe Utah REIA has listened and has created a custom website to meet the needs of the real estate investor. This new website will:\u003C\/span\u003E\u003C\/p\u003E\n\u003Col\u003E\n\t\u003Cli\u003EShowcase discounts and special offers from favorite retailers including, but not limited to, Home Depot, Office Max, and Western Reporting.\u003C\/li\u003E\n\t\u003Cli\u003EProvide access to meeting videos and Powerpoint presentations dating back to the inception of the Utah REIA\u003C\/li\u003E\n\t\u003Cli\u003EAllow for Vendors to customize Business Directory listings as well as provide access to post special discounts and incentives\u003C\/li\u003E\n\t\u003Cli\u003EContinue to provide access\u003Cspan class=\u0022text_exposed_show\u0022\u003E to the Utah REIA Library--an archive of 27 folders filled with publications surrounding topics including, but are not limited to 1031 Exchanges, Foreclosures, Forms & Contracts, and Business Management.\u003C\/li\u003E\n\t\u003Cli\u003EProvide a way to connect easily with members of the Utah REIA\u003C\/li\u003E\n\u003C\/ol\u003E\n\n\u003Cp\u003ECome and learn how all of this works so that you can take advantage of these amazing tools as well as provide us with feedback to help us help meet your needs better!\u003C\/p\u003E","className":"Blue"}]
その配列をコピーしてjsファイルに配置すると、イベントが表示されますが、URLを使用すると表示されません。
Ready.js :
jQuery(document).ready(function( $ ) {
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
header: {
left: 'title',
center: '',
right: 'today agendaDay,agendaWeek,month prev,next'
},
defaultView: 'month',
fixedWeekCount: false,
scrollTime: "08:00:00",
aspectRatio: 2,
editable: adminEdit,
events: plgFcRoot + 'events/feed',
eventRender: function(event, element) {
element.qtip({
content: event.details,
position: {
target: 'mouse',
adjust: {
x: 10,
y: -5
}
},
style: {
name: 'light',
tip: 'leftTop'
}
});
}
})
});