Hello! i having problems with some functionality in the lightbox configuration.
well the scenario is the next
i am working with asp.net and im not using a connector.
i have a main dhtmlxlayout with two panels, side A a dhtmlxTree, side B and dhtmlxScheduler.
so i attached and onClick event to the tree.
[code] CalendarioCargaDeTrabajo.ArbolTramites.attachEvent(“onClick”,CalendarioCargaDeTrabajo.Scheduler.CreateUnitViewScheduler); //This the tree.
// this is the function that is executed.
CalendarioCargaDeTrabajo.Scheduler.CreateUnitViewScheduler = function() {
var temporalString = CalendarioCargaDeTrabajo.ArbolTramites.getSelectedItemId().split("."); //Formato correcto?
var idProceso = “idProceso=” + temporalString[1];
var parametersOnRequest = idProceso + “&idPeriodo=” + CalendarioCargaDeTrabajo.ComboBoxPeriodos.getSelectedValue();
var responseFromServer = CalendarioCargaDeTrabajo.AjaxRequest(CalendarioCargaDeTrabajo.XMLPath + "/LoadUnitViewschedulerXML.aspx", parametersOnRequest, "text");
if (responseFromServer == null || responseFromServer == "") {
CalendarioCargaDeTrabajo.Scheduler.clearAll();
CalendarioCargaDeTrabajo.Scheduler.createUnitsView("Horarios", "section_id", new Array(0));
} else {
var temporalLabels = responseFromServer.split("|");
CalendarioCargaDeTrabajo.RemoveElementFromarray(temporalLabels, "|");
CalendarioCargaDeTrabajo.RemoveElementFromarray(temporalLabels, "");
var sections = new Array(temporalLabels.length);
for (var index = 0; index < temporalLabels.length; index++) {
sections[index] = new CalendarioCargaDeTrabajo.Scheduler.SectionViewObject(index, temporalLabels[index]);
}
CalendarioCargaDeTrabajo.Scheduler.createUnitsView("Horarios", "section_id", sections);
CalendarioCargaDeTrabajo.Scheduler.config.lightbox.sections = null;
CalendarioCargaDeTrabajo.Scheduler.config.lightbox.sections = [
{ name: "description", height: 130, map_to: "text", type: "textarea", focus: true },
{ name: "custom", height: 23, type: "select", options: [b]sections[/b], map_to: "section_id" },
{ name: "time", height: 72, type: "time", map_to: "auto"}];
var xmlResponseServer = CalendarioCargaDeTrabajo.AjaxRequest(CalendarioCargaDeTrabajo.XMLPath + "/LoadCargasDeTrabajoXML.aspx", parametersOnRequest, "xml");
CalendarioCargaDeTrabajo.Scheduler.parse(xmlResponseServer);
}
}
[/code]
this function just create Unit views depending on the data that i recieved from an ajax request. it brings the xml and the events are display in the dhtmlxScheduler.
So when i click a random node from the tree the dhtmlxScheduler displays the events,when this happen for the first time the ligthbox select options are correct.
if i click another node from the tree and the function is executed the select options from the lightbox is the same!!! the data is not update. i have no idea what is wrong with that!
let’s say i click a node call “Rodrigo” and then i click on the events in the dhtmlxScheduler
the lightbox apears and the select options are " 1 week, 2 weeks"
the problem is that the select options in every ligthbox will stay the same for every node in the tree.
Excuse my english!