Hi,
While trying to build a bookingsystem I came accross two issues in the timeline part of the Scheduler:
- I’ve built in a combo box in the lightbox which works fine, but I want the selected name to be shown as text in the scheduler overview. I can make that work after reloading the page, but not directly after creating the event. The combo box gets it’s data from a database with a numeric value as key and a namefield. Combo works as it should, saves an integer to my db, but now I want the name directly to be shown as text on the calendar. How can I do that?
- When I doubleclick on an event in timeline view, the event saves itself, but doesn’t open the lightbox. In day,week and month view this works how it should. How to solve this issue?
Thank you!
[code]function initScheduler() {
scheduler.locale.labels.timeline_tab = "Per Kamer";
scheduler.locale.labels.section_custom="Kamer";
scheduler.locale.labels.section_guest="Gast";
scheduler.config.details_on_create=true;
scheduler.config.details_on_dblclick=true;
scheduler.config.xml_date="%Y-%m-%d %H:%i";
//===============
//Configuration
//===============
var sections=[
{key:1, label:“Kamer 23”},
{key:2, label:“Kamer 24”},
];
scheduler.createTimelineView({
name: "timeline",
x_unit: "day",
x_date: "%F %d",
x_step: 1,
x_size: 7,
x_start: 0,
x_length: 7,
y_unit: sections,
y_property: "unit",
render:"bar",
round_position:true,
});
var sTabs = ‘
’+‘’+
‘’+
‘’;
scheduler=dhxLayout.cells(“b”).attachScheduler(null, “timeline”, sTabs);
//===============
//Data loading
//===============
scheduler.config.lightbox.sections=[
{name:“guest”, height:23, type:“combo”, image_path:“dhtmlx/scheduler/samples/common/dhtmlxCombo/imgs/”, height:30, filtering:true, map_to:“guest”,script_path:“dp/bookings/guest_combo.php”, focus:true },
{name:“description”, height:130, map_to:“text”, type:“textarea” },
{name:“custom”, height:23, type:“select”, options:sections, map_to:“unit” },
{name:“time”, height:72, type:“time”, map_to:“auto”}
];
scheduler.load(“dp/bookings/bookings_conn.php”);
var dp = new dataProcessor("dp/bookings/bookings_conn.php");
dp.init(scheduler);
}[/code]