I created a Units view spanning a week, using multiday on and the multisection extension.
Multi-day events don’t display properly when they’re assigned to more than one section. Regular events are fine - just multiday exhibits this issue.
If the multiday event is assigned to more than one section, the event shows up as undefined. The source code shows event_id as undefined.
Please also note, I am using a custom delimiters for multi sections (I don’t know if that matters). I am running version 4.3.4 of Scheduler, which addressed an issue with custom delimiters.
Thanks.
Hello,
we’ve confirmed a bug. I’ll send you an updated version of an extension as soon as the fix is ready
Thank you! This fixed the issue.
Now I still have another issue with this view. When we start on this view, or refresh this view, the events are not loaded. We have to go to another view, refresh, then go back to this view to see the events.
If it makes a difference, we are using data processor to load the events. And we are using the URL extension to show the right view (mode=week_unit).
Here is the createunits code:
[code]/one day unit tab/
scheduler.createUnitsView({
name:“unit”,
property:“unit”,
list:resources,
skip_incorrect:true});
}
/weekly unit tab/
scheduler.createUnitsView({
name:“week_unit”,
property:“unit”,
list:resources,
skip_incorrect:true,
days:7
});
scheduler.date.week_unit_start = scheduler.date.week_start;
[/code]
Hello ,
I think I have a similar bug.
The month view is running well but in day and week views it display ‘undefined’ for each event.
It doesn’t occure when editing.
My code:
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.init('scheduler_here', new Date(),"month");
scheduler.config.first_hour = 7;
scheduler.config.last_hour = 23;
scheduler.config.time_step = 15;
scheduler.config.limit_time_select = true;
scheduler.config.scroll_hour = 8;
scheduler.config.cascade_event_display= true;
scheduler.attachEvent("onBeforeEventChanged", function(ev, e, is_new, original){
if (is_new) {
return true;
} else {
if (confirm("Souhaitez-vous vraiment modifier cet événement?")) {
return true;
} else {
return false;
}
}
});
var alert_opts = [
{ key: 0, label: 'Choisissez' },
{ key: 1, label: '<?php echo $tab_type_event[1]; ?>' },
{ key: 2, label: '<?php echo $tab_type_event[2]; ?>' },
{ key: 3, label: '<?php echo $tab_type_event[3]; ?>' },
{ key: 4, label: '<?php echo $tab_type_event[4]; ?>' },
{ key: 5, label: '<?php echo $tab_type_event[5]; ?>' },
{ key: 6, label: '<?php echo $tab_type_event[6]; ?>' },
{ key: 7, label: '<?php echo $tab_type_event[7]; ?>' }
];
scheduler.locale.labels.section_select = 'Type';
scheduler.locale.labels.section_text = "Ordre du jour";
scheduler.templates.event_text = function(start,end,ev){
return ev.description;
};
scheduler.config.lightbox.sections = [
{ name:"select", height:40, map_to:"text", type:"select", options:alert_opts, focus:true },
{ name:"time", height:72, type:"calendar_time", map_to:"auto"}
];
// auto fin d'event
scheduler.config.event_duration = 180;
scheduler.config.auto_end_date = true;
scheduler.config.full_day = true;
// INPUT
var idhg="<?php echo $_SESSION['nomhg']; ?>";
scheduler.load("dhtmlxschedulerv4/codebase/connector.php?idhg="+idhg);
// OUtput
var dp = new dataProcessor("dhtmlxschedulerv4/codebase/connector2.php?idhg="+idhg);
dp.init(scheduler);
scheduler.attachEvent("onEventSave",function(id,ev,is_new){
if (ev.text.length<1) {
alert("Choisissez un type d'événement!");
return false;
}
if (ev.text=='0') {
alert("Choisissez un type d'événement!");
return false;
}
return true;
})
scheduler.attachEvent("onEventAdded", function(id,ev){
if (scheduler.getEvent(id).text=='1'){
scheduler.getEvent(id).text = "<?php echo $tab_type_event[1]; ?>";
scheduler.updateEvent(id);
}
if (scheduler.getEvent(id).text=='2'){
scheduler.getEvent(id).text = "<?php echo $tab_type_event[2]; ?>";
scheduler.updateEvent(id);
}
if (scheduler.getEvent(id).text=='3'){
scheduler.getEvent(id).text = "<?php echo $tab_type_event[3]; ?>";
scheduler.updateEvent(id);
}
if (scheduler.getEvent(id).text=='4'){
scheduler.getEvent(id).text = "<?php echo $tab_type_event[4]; ?>";
scheduler.updateEvent(id);
}
if (scheduler.getEvent(id).text=='5'){
scheduler.getEvent(id).text = "<?php echo $tab_type_event[5]; ?>";
scheduler.updateEvent(id);
}
if (scheduler.getEvent(id).text=='6'){
scheduler.getEvent(id).text = "<?php echo $tab_type_event[6]; ?>";
scheduler.updateEvent(id);
}
if (scheduler.getEvent(id).text=='7'){
scheduler.getEvent(id).text = "<?php echo $tab_type_event[7]; ?>";
scheduler.updateEvent(id);
}
});
Do you have a bug fix or I have made a mistake?
Thank you.
This is solved.
I Had a wrong command.
scheduler.templates.event_text = function(start,end,ev){
return ev.description;
};