i have two select multiple en mi form_block
my question is how to remind or put the data selected in the second select(empleado) when make double click
in the event.
this is my code
scheduler.form_blocks[“my_editor”]= {
render:function(sns){
return “
“”+
“<?php
$empleados = getLideres();
foreach($empleados as $lider){
echo ‘<option value=’’.$lider[‘idEmpleado’].’’’;
echo ‘>’.$lider[‘nombreCompleto’].’’;
}
?>”+
“”+
“”+
“<?php
$con= mysql_connect($servidor,$usuario,$contrasenia) or die (mysql_error());
mysql_select_db(BD_CYSA) or die(mysql_error());
$devuelve = $event_id;
if($event_id!=0){
$query = “SELECT idEmpleado, CONCAT(aPaterno, ’ ', aMaterno, ’ ', nombre) AS nombreCompleto FROM $bd_Cont.$tb_Empleado JOIN “.BD_CYSA.”.events_detalle USING(idEmpleado) WHERE event_id=”.$event_id.” ORDER BY aPaterno" or die (mysql_error());
$result=mysql_query($query,$con) or die(mysql_error());
while($linea=mysql_fetch_array($result)){
echo ‘<option value=’’.$linea[‘idEmpleado’].’’’;
if($idEmpleado==$linea[‘idEmpleado’]){
echo ‘selected=‘selected’’;
}
echo ‘>’.$linea[‘nombreCompleto’].’’;
}
}
?>"+
“”+
"
“+
"
“+
“
},
set_value:function(node,value,ev){
node.childNodes[1].length = 0;
btns = node.childNodes[2].getElementsByTagName(‘input’);
btns[0].onclick = function onclick(event){ return swapSelect(node.childNodes[0], node.childNodes[1]); };
btns[1].onclick = function onclick(event){ return swapSelect(node.childNodes[1], node.childNodes[0]); };
scheduler.attachEvent(“onEventSave”,function(id,data){
if(!ev.emple) ev.emple = [];
var j = node.childNodes[1].options.length;
for(i=0; i<j; i++){
alert(node.childNodes[1].options[i].value)
ev.emple[i] = node.childNodes[1].options[i].value;
}
return ev.emple;
});
},
get_value:function(node,ev){ }
};
scheduler.config.lightbox.sections=[
{name:“description”, height:100, type:“textarea”, map_to:“text”, focus:true },
{name:“custom”, height:23, type:“select”, options:sections, map_to:“idAuditoria” },
{name:“detail”, height:100, type:“my_editor”, map_to:“auto”, focus:false },
{name:“type”, height:21, type:“select”, map_to:“event_type”, options:[
{ key:0, label:“Urgente” },
{ key:1, label:“Normal” }
]},
{name:“recurring”, height:115, type:“recurring”, map_to:“rec_type”, button:“recurring”},
{name:“time”, height:72, type:“time”, map_to:“auto”}
];
scheduler.createUnitsView(“unit”,“idAuditoria”,sections);
scheduler.config.multi_day = true;
scheduler.init(‘scheduler_here’, null, “year”);
scheduler.load(”…/modelo/m_scheduler_getData.php”);
var dp = new dataProcessor("…/modelo/m_scheduler_getData.php");
dp.setTransactionMode(“POST”, true);
dp.enablePartialDataSend(true);
//dp.setDataColumns([false,true,true,true]);
dp.init(scheduler);
}
scheduler.attachEvent(“onBeforeLightbox”,function(id){
var ev = this.getEvent(id);
var date = ev.start_date;
return (date.getDay()&&date.getDay()!=6)
});
scheduler.attachEvent(“onEventCreated”,function(id){
scheduler.getEvent(id).type = 0;
return true;
});
scheduler.attachEvent(“onEventAdded”,function(id){
var devuelve = this.getEvent(id);
return true;
});