I use dhtmlxScheduler v2.3 together with dhtmlxTree v2.6.
Next to the default day, week and month views, I created a timeline and units view. I used dhtmlxTree to generate a list with all of our customers with their tickets. They can be dragged into the scheduler. In the day, week, month and timeline view everything goes well, but in the units view when I drop, it doesn’t drop. I have to click again to open the lightbox.
Strange thing is, when I drag-n-drop in the day view, then switch to the units view, drag-n-drop a ticket there, everything goes well, but when I save or close the form and then drag-n-drop again (in the units view), it doesn’t work anymore.
Do I have to reset anything or something?
My code for timeline (This one works perfect):
[code]scheduler.locale.labels.timeline_tab = “Timeline” // Tekst op de tab
var groepen = [];
$.ajax({
url: APP_URL + ‘ajax.php’,
dataType: ‘json’,
data: ‘do=getMedewerkersInGroep’ + urlParams,
async: false,
success: function(json){
groepen = json;
}
});
scheduler.createTimelineView({
section_autoheight: false,
name: "timeline",
x_unit: "minute",
x_date: "%H:%i",
x_step: 30, // Hoeveel x_unit per vakje
x_size: 27, // Het aantal vakjes (x_unit)
x_start: 14, // Het start vakje
x_length: 16, // Hoeveel stapjes heb ik nodig voor een hele dag
y_unit: groepen, // Welke groepen moeten zichtbaar zijn
y_property: "section_id", // wbn_medewerker_id werkt niet, gewijzigd in section_id
render: "tree", // Laten zien als tree, dus kunnen in- en uitklappen
folder_events_available: false, // Evenement per map (categorie) instellen
dy:60
});[/code]
Here’s my code for the units view (Here it goes wrong):
scheduler.locale.labels.persoon_tab = "Persoon" // Tekst op de tab
var personen = [];
$.ajax({
url: APP_URL + 'ajax.php',
dataType: 'json',
data: 'do=getMedewerkers' + urlParams,
async: false,
success: function(json){
personen = json;
}
});
scheduler.createUnitsView({
name:"persoon",
property:"wbn_medewerker_id",
list:personen
});
The “personen” (persons) are called through AJAX, JSON output there is:
[{"key":"1","label":"Administrator"},{"key":"210","label":"Danielle"},{"key":"217","label":"Ivo"},{"key":"203","label""Jaap"},{"key":"220","label":"Jacco"},{"key":"212","label":"Jan Willem"}]
The code for onExternalDragIn:
[code]scheduler.attachEvent(“onExternalDragIn”, function (id, source, event){
// Drag-n-drop op true zetten
dnd = true; // Global variable
// Het volledige label
var label = tree.getItemText(tree._dragged[0].id).replace(/\"/g, '');
// Do some things with the label to extract the ticket number
return true;
});[/code]