cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify or extend the calendar dashlet?

rock_tu
Champ on-the-rise
Champ on-the-rise
Hello All
Now I want to modify the calendar dashlet in site,the problem as following:
We know that when we add calendar event ,we can't notify the event to everyone besides the person belong the specify site,now I want that when I add calendar event ,I can notify the specify person that I select the person not every one in the site,though a peson belong to the site,when I don't notify the event to he or she,he or she can't see it in his or her dashboard.Meanwhile,I can send email to the specify person,How I can do that achivee it?Any one could give me a good idea,thank you very much!!
3 REPLIES 3

jpotts
World-Class Innovator
World-Class Innovator
Forgive me, but I am having a hard time following what you are trying to do. May I suggest that you break up your requirements into smaller chunks and list them individually.

In general, the calendar dashlet can be customized like any other dashlet, so when you are listing your requirements, tell us what you've tried on your own so far and where you are having problems. If your question remains too generic or it appears you haven't tried to do the work yourself, you may have a hard time getting an answer.

Jeff

rock_tu
Champ on-the-rise
Champ on-the-rise
Hello Jeff
At first,thank you for your reply,
When I create a site named A and customize the dashboard then add site calendar dashlet
In site calendar page,I click "add event" buttom,now my problems are as follow
1 I want to select some people who can know the event not evevy one,even  he or she in the site A(in original design,if the people belong to the site,he or she can know the site calendar event in his or her user calendar dashlet)
2 base on the step one,if some people was selected who can know the event,I can notify he or she by email
that is another to say,How I can extend the site calendar dashlet?
Do you know my question?How I can do that achieve it,thank you again!!

jpotts
World-Class Innovator
World-Class Innovator
A calendar entry is a piece of content which can have permissions. One way to restrict who can see calendar entries is to change the permissions on the specific entries you want to hide. By default, content inherits the ACL of its parent, so by default, all calendar entries are visible by everyone who belongs to the site.

If you know the node reference of a calendar entry, you can use JavaScript to try this out. You can run this code:
document.setInheritsPermissions(false);
document.setPermission("Collaborator", "tuser1");

Which will (1) break ACL inheritance for that specific calendar entry and (2) give full control of the calendar entry to the user named "tuser1". You could obviously add as many here as you would like.

Now when you log in as another user, they won't see the calendar entry, but tuser1 will.

Once you understand how permissions affect the calendar entry you can then decide how you want to expose that to the user interface. For example, you might want to modify the calendar entry form to include a field that launches the people picker dialog. The user then selects the users they want to add to the entry, much like they would when starting a workflow. You'll also have to customize the code that creates the calendar entry so that the permissions get set using the values specified in the people picker dialog.

So that's a rough idea of how to approach it.

Jeff