Menu
Welcome, Guest
Username: Password: Secret Key Remember me
Welcome to the Developer forum!
Get all your questions answered here. Learn to integrate calendar in your application.
  • Page:
  • 1

TOPIC: Group Name

Group Name 15 years 2 months ago #74

  • brutka
  • brutka's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
Please, advise, how can I get the group name (for ex, in my Preview Template)?

Please Log in to join the conversation.

Re: Group Name 15 years 2 months ago #78

  • alammm
  • alammm's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
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.

Re: Group Name 15 years 2 months ago #79

  • brutka
  • brutka's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
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.

Re: Group Name 15 years 2 months ago #81

  • alammm
  • alammm's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
Which version of calendar are you using?

Please Log in to join the conversation.

Re: Group Name 15 years 2 months ago #82

  • brutka
  • brutka's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
1.2.8

Please Log in to join the conversation.

Re: Group Name 15 years 2 months ago #86

  • alammm
  • alammm's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
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.

Re: Group Name 15 years 2 months ago #87

  • brutka
  • brutka's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 0
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.

Re: Group Name 15 years 2 months ago #89

  • alammm
  • alammm's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 0
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.

  • Page:
  • 1
Time to create page: 0.080 seconds
Powered by Kunena Forum

LATEST IN FORUM

  • No posts to display.

ABOUT US