我需要相同的幫助來填充JSON在日曆上。該JSON是這樣的:FullCalendar Grails中
{
「開始」: 「」,
「結束」: 「」,
「稱號」: 「」,
「總結」: 「」
}
我回到這個JSON;
def createJSONEvent = {
def json="["
json+="{"
json+="title:\"fede\","
json+="start:'2012-05-01T22:00:00',"
json+="end:'2012-05-01T22:30:00',"
json+="allDay: false,"
json+="url:\"${request.contextPath}/calendar/index/1\","
json+="backgroundColor:'blue',"
json+="textColor:'black'"
json+="}"
json+="]"
render json
}
而且我想這個HTML代碼來顯示它:
<fullcal:calendar id="cal">
theme: true,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay',
},
columnFormat: { week: 'ddd d/M' },
timeFormat: 'HH:mm{ - HH:mm}',
selectable: true,
selectHelper: true,
editable: true,
events:${include(controller:"calendar", action:"createJSONEvent")}
</fullcal:calendar>
並沒有任何反應。控制檯顯示:
2012-05-18 12:33:13319 [HTTP-8080-1] ERROR resource.ResourceMeta - 未找到資源:/plugins/full-calendar-1.5.1.0/css/fullcalendar .css
2012-05-18 12:33:13,324 [http-8080-1] ERROR resource.ResourceMeta - 找不到資源:/plugins/full-calendar-1.5.1.0/js/fullcalendar.min.js
2012-05-18 12:33:14082 [HTTP-8080-1] ERROR resource.ResourceMeta - 未找到資源:/plugins/full-calendar-1.5.1.0/css/fullcalendar.print.css
我錯過了什麼?
即使你的英語不好您仍然可以只要幫助這裏的人可以告訴你是問。但這個問題不是很清楚。我們不知道它是什麼,你想做的事,我們不能告訴你有什麼問題。你能告訴我們你已經嘗試過的代碼? – David
是的,我想表明從JSON事件,代碼是這樣的, \t高清getCalendarByName(DEF日曆){ \t \t高清CAL = Calendar.findById(日曆) \t \t ArrayList的事件=新的ArrayList() \t \t字符串格式= 「YYYY-MM-dd'T'hh:MM」 \t \t cal.events.each {A - > \t \t \t的JSONObject jsonEvent = [:] \t \t \t jsonEvent.id = a.id \t \t \t jsonEvent.summary = a.summary \t \t \t jsonEvent.start = a.startDate \t \t \t jsonEvent.end = a.endDate \t \t \t jsonEvent.description = a.description \t \t \t events.add (jsonEvent) \t \t} \t \t的JSONObject JSON = [:] \t \t json.id = CAL。ID \t \t json.name = cal.name \t \t json.events =事件 \t \t返回JSON \t} – fedecarossino
感謝額外的信息。在你的問題下有一個鏈接,說'編輯'。請點擊並在您的問題中包含這些信息。閱讀評論太難了。 – David