在日历上,如果我在ready.js文件的events部分中对json数组进行硬编码,我只能获取事件。如果我使用网址,他们将无法显示。
如果我浏览到带有显示json数组的事件的url。
以下是数组中的示例事件:
[{"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'
}
});
}
})
});
答案 0 :(得分:0)
我使用的是$ this-> loadComponent(' RequestHandler');在我的App Controller中,这是为整个应用程序启用数据视图,并导致事件无法呈现。我从我的App Controller中取出它,它现在正在显示事件。