Hello.
After week off, coming back with my last non solution…
I followed the previous consulting but I dont understand why the “type” (as an ‘id’ int) of the meeting is not saved in my sql DB with the field ‘subject’ mapped to ‘text’…
Do you have any idea?
This is my code:
scheduler.init("scheduler_here",new Date(),"month");
scheduler.serverList("options", [
{ key: 0, label: 'Choisissez' }
<?php
$i=1;
while (!($i>$last_id)) {
echo ",{ key: ".$i.", label: '".$tab_type_event[$i]."' }";
$i++;
}
?>]);
scheduler.config.lightbox.sections=[
{name:"subject", height:20, type:"select", map_to:"text",options: scheduler.serverList("options"), focus:true },
{ name:"odj", height:50, map_to:"type", type:"textarea"},
{ name:"time", height:72, type:"calendar_time", map_to:"auto"}
];
// input DB SQL
var idhg="<?php echo $_SESSION['nomhg']; ?>";
scheduler.load("dhtmlxschedulerv4/codebase/connector.php?idhg="+idhg);
//scheduler.load("dhtmlxschedulerv4/codebase/connector/data_db.php");
// OUtput DB SQL
var dp = new dataProcessor("dhtmlxschedulerv4/codebase/connector.php?idhg="+idhg);
dp.init(scheduler);
(function(){
var optionsHash = null;
function buildSearch(){
// build hash with options to speed up search in case huge amount of events/options
optionsHash = {};
var list = scheduler.serverList("options");
for(var i = 0; i < list.length; i++){
optionsHash[list[i].key] = list[i].label;
}
}
scheduler.attachEvent("onOptionsLoad", function(){
optionsHash = null;
});
function getLabel(optionId){
if(!optionsHash) buildSearch();
return optionsHash[optionId] || "";
}
// text content of events in day/week/units views
scheduler.templates.event_text = function(start, end, ev){
return getLabel(ev.text);
};
// text content of events in month/timeline views
scheduler.templates.event_bar_text = function(start, end, ev){
return getLabel(ev.text);
}
})();
and my connector:
[code]<?php
require_once(“connector/scheduler_connector.php”);
$base=‘xxxxx’.$_GET[‘idhg’];
$res= mysql_pconnect(“xxxxx”, “xxxxx”, “xxxxx”) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db($base);
$schedulerConn = new SchedulerConnector($res);
$schedulerConn->render_table(“reunions”,“id”,“start_date,end_date,type,ordreduj”);
[/code]