search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Change text content of an event client side?

Asked by LarryDavidJr
11 years ago.


Had a good look around for this. Found one or two things that don't seem to work so I'll ask.

I've got the Notify event model working fine. However, I'd also like to update the text of an event as its displayed in the scheduler from the client side.

Currently, I have to wait until the notify call to the server which re-loads the scheduler (I have code to customize the text content of events server side).

I am using the Notify queue as a sort of 'do work before saving' mechanism, which works fine, but if users change something that should change the event text, it looks to them like it hasn't worked, because the text does not change.

//Update the event object that I found
var eventData = new Object();
eventData.employee_id = $("#employee").val()
eventData.eventtypeid = $("#eventtype").val();

//Queue the changes, eventData).queue();

This works but the event in the scheduler on screen still has the old text. I can't find a reference to being able to change the text directly in any of the documentation.

Also, while we're on this subject, is there any way to change the background color of an event from client side? (somethign else I'm doing server side on an event by event basis, but would like to replicate client side).

I'm using 6.9.2525.1 DEMO

Answer posted by Dan Letecky [DayPilot]
11 years ago.

There is a set of methods that allow you to set the client-side properties:

e.client.innerHTML("New HTML");
e.client.toolTip("New ToolTip");
e.client.contextMenu(menu); or e.client.contextMenu("menu");

It will appear soon in the DayPilot.Event API docs:

In the next release (7.0), using e.text() will automatically set e.client.innerHTML() too.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.