I wanted to update/refresh all scheduler after user add/delete/edit events evey time, but I set “scheduler.config.update_render=true” it didn’t work anymore.
In this case, I had multi-users to use one server (DB).
But in multi-user system the task is more complicated - other users need to receive signal , that some data need to be updated. Which will require implementing of long-polling|comet data loading, which is not a simple task.
i am working on this thread, viewtopic.php?f=6&t=13677, thanks for the replies, scheduler got a good look now.
i have a ‘reload’ button which is out side the scheduler render area (‘scheduler_here’ div) , i want to reload the scheduler data when i click on the button,
My firebug console shows request successfully completed & xml is loaded correctly, but when i see a details of the events, i see no changes at all. The context is, i am trying to add events type with a different pop up & this needs to be updated in scheduler lightbox select box as i add new events type.
i added prevent cache line in the first init and also in the reload function ( scheduler.config.prevent_cache = true;) and further passed random variable to scheduler.load
$("#reloadBtn").click(function(){
scheduler.config.prevent_cache = true;
var dat = new Date().getTime();
scheduler.clearAll();
scheduler.load(“codebase/events.php?user=<?php echo $userId;?>&uid=”+scheduler.uid()+"&tm="+dat)
return true;
});
still i am not getting the refreshed scheduler view. Every time i press the the reload button, i see the xml loaded is the updated one but the scheduler lightbox is not updated with the new values.
i have no options left now than to reload the whole page after every update or reload the whole display with ajax. any suggestions please??
Stanislav, i now completely understand what you are saying, this is exactly the case i am facing now.
Because already opened lightbox will not be populated with new data automatically.
yeah, i tried on what you said,
when i first add data using pop up and reload the scheduler with reload button, after that if i open the lightbox, it’s populated correctly.
but when i first open lightbox, close it, then add data with pop up and re-open the lightbox after reload, the lightbox is not updated.
You are loading new data and opening lightbox after that, right?
you see, loading data to the values for select box is done in separate pop ups, with ajax call. i think this will be completely on user side whether he will open scheduler lightbox before adding the data or after adding them. how would i address it ?
As far as I can understood - inside lightbox you have some sections which can be populated | changed by some other logic, and after changing data in this collection you still see old values in lightbox, right?
Liughtbox is rendered only once, during first opening, so it will not reload it list connections if they were updated. You can add the next line ( when lightbox need to be updated )
scheduler._lightbox = null;
it will force re-rendering of lightbox, so it will use new collections for rendering.