First of all this is really a fantastic ed efficente product.
I managed to customize to suit my needs, nut i’ve a “little” problem left.
Shortly, since I have put labels on the events based on custom fields retrieved via join e xml, I’d like the view in which I am to update itself AS IF I hit f5 on the browser, that is to say reloading data from the xml and thus updating correcty the custom labels I set for the event.
More shortly and with no more digging, is it possible AFTER EVERY UPDATE/INS operation TO FORCE full reload of the ACTUAL VIEW…
I tried, following some thread here, what follows in the js:
By thinking this way it would have got data from the updated xml again.
But i doesn’t happen.
I also tried this:
and this in the connector page:
Thak you so much, if anyone has the patience to read this.
There are two ways to update data.
Direct one will be
//client side code
dp.attachEvent("onAfterUpdate", function(){
scheduler.load("some.data"); //the same data feed as was used for initial data loading
return true;
});
Above code will reload all scheduler after each data saving
The more complex solution would be in sending extra data from server side
function post_update($data){
$data->set_response_attribute("name", "value");
}
and on client side use it to update event
//client side code
dp.attachEvent("onAfterUpdate", function(sid, action, tid, tag){
if (action == "update"){
scheduler.getEvent(tid).some = tag.getAttribute("name");
scheduler.updateEvent(tid);
}
return true;
});
//scheduler.load("events.php");
var dp = new dataProcessor("cx.php");
dp.attachEvent("onAfterUpdate", function(){
alert('go');
scheduler.load("events.php"); //the same data feed as was used for initial data loading
return true;
});
dp.init(scheduler);[/code]
I do see the alert i added, whenever I move events across day, rooms, or people, but the event box DOESN’T CHANGE, or rather it changes for ex. the time on his own but not the extra labels I defined like this:
In any case no ajax request is made, after the one “editing=true”.
In this case the background color of the little box I draw is taken directly from the xml generated file, so whenever I change “room” in the roow view it should change accordingly, shouldn’t it?
As I understood you are moving events between rooms in the customized Units view and ‘event_text’ and ‘event_header’ templates and not applied correctly? Does it not work for all used properties or only some of them? If so please specify which properties are applied and which are not.
event_text
How do you assign values for event.paziente and event.medico properties? Note that changing rooms (moving event to the another section) itself would only update id_stanza property and not any other custom property so some client or server side logic should be used to do it.
event_header
Same questions for event.colore and event.nome_stanze properties - how do you set and update them?
If you are updating events using server side logic be sure to check that it is used for updated events as well as new (inserted). Also try to update event in the scheduler and then check if correct properties (color and so on) are saved.
Also note that you are loading events from events.php but saving using cx.php.
Best regards,
Ilya
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan