I’m having problems with the custom lightbox sections. 1) I’m not sure how to map to a checkbox with an int value of 1 or 0. 2) when I reference a second field it doesn’t work anymore (ie node.childNodes[4].value = ev.details || “”; )
The example works fine so I’m not sure why mine would not. (samples/02_customization/05_custom_editor.html). the childNodes is 4 in that case with corresponds to the 5th element of the data.xml
I have other problems with the custom lightbox section but these are the primary one’s to complete one of my items.
-D
Code example:
scheduler.form_blocks["my_editor"] = {
render:function(sns) {
return "<div class='dhx_cal_ltext' style='height:30px;'>Text <input type='
text’>
Details ";
},
set_value:function(node, value, ev) {
node.childNodes[1].value = value || “”;
node.childNodes[4].value = ev.details || “”;
},
get_value:function(node, ev) {
ev.details = node.childNodes[4].value;
return node.childNodes[1].value;
},
focus:function(node) {
var a = node.childNodes[1];
a.select();
a.focus();
}
};
vn/vrb2/html_vrb2/dhtmlx_scheduler/samples/02_customization/05_custom_editor.html 44,5-14 47%
};
scheduler.form_blocks["custom_editor"] = {
render:function(sns) {
var id = scheduler.getState().select_id;
return "<div class='dhx_cal_ltext'>Mark Event Private <input type='checkbo
x’> Active ";
},
set_value:function(node, value, ev) {
node.childNodes[1].value = value || “”; // private
node.childNodes[14].value = ev.active || “”; // active
},
get_value:function(node, ev) {
ev.active = node.childNodes[14].value;
return node.childNodes[1].value;
},
focus:function(node) {
var a = node.childNodes[1];
a.select();
ws/scheduler.php.tpl 391,5-14 59%
//{name:“division”, height:20, type:“div_editor”, options: divisions, map_to:“division” },
{ name:“media_type”, height:20, map_to:“media_type”, vertical:false, type:“radio”, opti
ons:media_types },
{name:“recurring”, height:115, type:“recurring”, map_to:“rec_type”, button:“recurring”}
,
//{ name:“private”, map_to:“is_private”, type:“checkbox”, checked_value: “1”, unchecked
_value: “0”, height:40 },
{ name:“private”, map_to:“is_private”, type:“custom_editor”, checked_value: “1”, unchec
ked_value: “0” },
{ name:“cancel_reason”, height:20, map_to:“cancel_reason”, type:“textarea”, size:“15”,
focus:true },
{name:“color”, height:20, type:“color_editor”, options: event_color, map_to:“color” },
{ name:“details”, height:55, map_to:“details”, type:“note_editor”, focus:true },
{ name:“email_addr”, height:20, map_to:“email_addr”, type:“email_editor”, focus:true }
];