Hello,
When editing an event description, it saves properly to the database but does not update in the schedule as I expect it should. I am using Timeline View. Changing the start time/end time works fine. Is there a configuration that I am missing?
scheduler.locale.labels.timeline_tab = "Timeline"
scheduler.locale.labels.section_custom="Section";
scheduler.config.details_on_create=true;
scheduler.config.details_on_dblclick=true;
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.prevent_cache = true;
// Configure start/stop times and minute intervals, probably want to make these admin options.
scheduler.config.first_hour = 6;
scheduler.config.last_hour = 23;
scheduler.config.time_step = 15;
var sections = scheduler.serverList("sections");
var jobs = scheduler.serverList("jobs");
var statuses = scheduler.serverList("statuses");
scheduler.createTimelineView({
name: "timeline",
x_unit: "minute",
x_date: "%H:%i",
x_step: 15,
x_size: 48,
x_start: 32,
x_length: 96,
y_unit: sections,
y_property: "USRUsers_ID",
render:"bar"
});
scheduler.locale.labels.section_resources = "Field Users";
scheduler.locale.labels.section_jobs = "Job";
scheduler.locale.labels.section_statuses = "Status";
scheduler.config.lightbox.sections = [
{name:"description", height:130, map_to:"Description", type:"textarea" , focus:true},
{name:"statuses", height:23, type:"select", options:statuses, map_to:"PWPScheduledJobStatuses_ID" },
{name:"jobs", height:23, type:"select", options:jobs, map_to:"PWPJobs_ID" },
{name:"resources", height:23, type:"select", options:sections, map_to:"USRUsers_ID" },
{name:"time", height:72, type:"time", map_to:"auto"}
];
Here is my server side code:
$DataFields = "StartDateTime,EndDateTime,Description,PWPJobs_ID,USRUsers_ID,PWPScheduledJobStatuses_ID";
if ($scheduler->is_select_mode()) {
$DataFields .= ', Description, PWPJobs_ID';
$SQL = "SELECT PWPScheduledJobs.ID, $DataFields FROM PWPScheduledJobs LEFT OUTER JOIN PWPJobs ON PWPScheduledJobs.PWPJobs_ID = PWPJobs.ID ";
if ($a_FromDate != ''){
$SQL .= " AND PWPScheduledJobs.StartDateTime >= '". $a_FromDate."'";
}
if ($a_ToDate != ''){
$SQL .= " AND PWPScheduledJobs.EndDateTime <= '". $a_ToDate."'";
}
//code for loading data
$scheduler->render_sql($SQL, "ID", $DataFields);
}
else {
//code for other operations - i.e. update/insert/delete
$scheduler->render_table("PWPScheduledJobs","ID",$DataFields);
}
Thank you!