re,
Nota: all is working before liveupdate and the problem is the same when i doubleclick
After error, it’s impossible to add or update an event i have to reload the page.
the trace:
Uncaught TypeError: Cannot call method ‘valueOf’ of undefined dhtmlxscheduler.js:150
scheduler.addEvent dhtmlxscheduler.js:150
scheduler.add live_updates.js:204
(anonymous function) live_updates.js:33
dataProcessor.ignore dhtmlx.js:389
(anonymous function) live_updates.js:32
(anonymous function) sync.js:1
Faye.extend.each sync.js:1
Faye.Publisher.publishEvent sync.js:1
(anonymous function) sync.js:1
Faye.extend.each sync.js:1
Faye.extend.Set.Faye.Class.distributeMessage sync.js:1
Faye.Client.Faye.Class._A sync.js:1
(anonymous function) sync.js:1
Faye.Extensible.pipeThroughExtensions sync.js:1
Faye.Client.Faye.Class.receiveMessage sync.js:1
Faye.extend.each sync.js:1
Faye.Transport.Faye.extend.Faye.Class.receive sync.js:1
_b.onmessage sync.js:1
the scheduler configuration:
[i]scheduler.config.details_on_create = true;
scheduler.config.details_on_dblclick = true;
scheduler.config.show_loading = true;
scheduler.config.full_day = true;
scheduler.config.dblclick_create = false;
scheduler.config.update_render = false;
scheduler.config.first_hour = 09;
scheduler.config.last_hour = 18;
scheduler.config.event_duration = 30;
scheduler.config.auto_end_date = true;
scheduler.config.limit_time_select = true;
scheduler.config.time_step = 30;
scheduler.config.collision_limit = 1;
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.icons_select = ['icon_delete'];
scheduler.config.icons_edit = ['icon_cancel'];
scheduler.config.readonly_form = false;
scheduler.config.scroll_hour = new Date().getHours();
scheduler.locale.labels.section_Club = "CLUB";
scheduler.locale.labels.section_NomParrain = "PARRAIN";
scheduler.locale.labels.section_Filleul = "ID FILLEUL";
scheduler.locale.labels.section_description = "FILLEUL";
scheduler.locale.labels.section_Statut = 'STATUT RDV (definit par le club)';
scheduler.form_blocks.textarea.set_value=function(node,value,ev){
node.firstChild.value=value||"";
node.firstChild.disabled = true; //or just '= true' to disable all events
}
var statuts = [
{ key: 1, label: 'ABANDON' },
{ key: 2, label: 'VISITEUR' },
{ key: 3, label: 'VENDU' }
];
scheduler.config.lightbox.sections = [
{name:“description”, height:100, map_to:“text”, type:“textarea”, focus:true},
{name:“Club”, height:43, type:“select”, map_to:“clubs_id_club”, options: scheduler.serverList(“club”)},
{name:“Filleul”, height:30, type:“textarea”, map_to:“filleuls_id_filleuls”},
{name:“Statut”, height:58, options:statuts, map_to:“etat_rdv”, type:“radio”},
{name:“time”, height:72, type:“time”, map_to:“auto”}
];
scheduler.templates.tooltip_text = function(start,end,event) {
var statut = “AUCUN STATUT”;
if (event.etat_rdv == 1) {
var statut = "ABANDON";
}
if (event.etat_rdv == 2) {
var statut = "VISITEUR";
}
if (event.etat_rdv == 3) {
var statut = "VENDU";
}
return "<b>STATUT CLUB:</b> "+statut;
};
cell_agenda.attachScheduler();
var dpsched = new dataProcessor("xml/scheduler.php");
dpsched.live_updates("http://localhost:8008/sync");
dpsched.setTransactionMode("POST",true); // because i have connector
dpsched.init(scheduler);[/i]
Thanks