Welcome,
Guest
|
|
You can control the entire contents displayed in preview template.
Provide the onPreview Callback (for whichever view it is). The Event object is one of the parameters to the callback. You can get the groupID from the event Object. Using all the information construct a HTML string to be displayed in preview window. And then invoke ical.showPreview(dataObject, NEW HTML STRING) You can control the time format too and whatever else is displayed in preview. |
Please Log in to join the conversation. |
|
alammm, thanx.
I have customized the template I just can't get how can get the group name or group Id in the template. what is the syntax? could you, please, provide an example for that? |
Please Log in to join the conversation. |
|
Alright, May be you can try this. I have not tested this code.
<div id="myPreviewID"> <div id="header">${eventName}</div> <span id="myDate"></span> </div> function onPreview(calEvent, evObj, htmlStr){ jQuery("#myDate").html(format(evObj.startTime)); jQuery("#header").html(evObj.eventName); ical.showPreview(calEvent, jQuery("#myPreviewId")); } OR function onPreview(calEvent, evObj, htmlStr){ jQuery(htmlStr).find("#myDate").html(format(evObj.startTime)); ical.showPreview(calEvent, jQuery("#myPreviewId")); } OR <div id="myPreviewID"> <div id="header">${eventName}</div> <span id="myDate">${function: formatMyDate}</span> </div> function formatMyDate(event) { return format(event.startTime); } The second option, you are using the inbuilt conversion and updating particular fields with your value. Try any of the 3 options. post back which one was easy to use. They may not be synctactically right, but should convey the idea... |
Please Log in to join the conversation. |
|
alammm,
thank you very much for your help. I have succeded to show eventname and times in custom preview template. but (and this is my main questions) how can i get GROUP NAME of the Event. I still can't understand. I have tried ${group}, ${group.name}, ${group} - no good. |
Please Log in to join the conversation. |
|
are you able to get groupId? from event? by event.groupId or event.group.groupId?
If you are getting groupId, get the appropriate group, I am assuming you have the groupList [since you provide this info on load.] You can search the group via groupId. and display that on preview. |
Please Log in to join the conversation. |