can i dynamically change ligthbox ???
and can lightbox attach to div object not whole area of page ???
can i dynamically change ligthbox ???
Kind of. You can change config and call
scheduler.resetLightbox();
So it will be regenerated during next edit operation
attach to div object not whole area of page ???
Nope, it always append itself to the document.body
can i init lightbox with all elements, but with value show or hide ???
and then with specific name of operator for example show or hide need elements in lightbox ???
because with scheduler.resetLightbox(); i need to create lightbox to specific operator and operators too many => many lightbox in code???
Check
docs.dhtmlx.com/doku.php?id=dhtm … ils_form&s[]=scheduler#making_section_hidden_for_some_events
thanks, example will be grate
if not be digging …
can create window from lightbox ???
or lightbox cover it ?
scheduler.config.lightbox.sections=[
{ name:"description", height:300, map_to:"text", type:"my_editor" , focus:true},
{ name:"time", height:72, type:"time", map_to:"auto"}
]
[code]scheduler.form_blocks.textarea.set_value=function(node,value,ev){
node.firstChild.value=value||"";
var style = ev.description?"":“none”;
node.style.display=style; // editor area
node.previousSibling.style.display=style; //section header
scheduler.setLightboxSize(); //correct size of lightbox
}[/code]
but description is still view …
Hello,
Yes, you can. Make sure that window’s z-index is greater than lightbox’s.
Sorry, didn’t get that. Can you please explain in detail?
Best regards,
Ilya
I have various user that have various forms thats in ligthbox, i want to include all section but show that depend to user that connected.
like i did withs
if (roles == 'REG') {
document.getElementById("agenda").style.display="none";
document.getElementById("timeline").style.display="block";
scheduler.locale.labels.timeline_tab = "Timeline";}
Hello,
Please double check you sample:
scheduler.config.lightbox.sections=[
{ name:"description", height:300, map_to:"text", type:"my_editor" , focus:true},
{ name:"time", height:72, type:"time", map_to:"auto"}
]
here ‘description’ section is of type ‘my_editor’.
scheduler.form_blocks.textarea.set_value=function(node,value,ev){
node.firstChild.value=value||"";
And here you are changing section of type ‘textarea’.
Correct example would be:
[code] scheduler.form_blocks.textarea.set_value = function(node, value, ev) {
node.firstChild.value = value || “”;
var style = ev.text ? “block” : “none”;
node.style.display = style; // editor area
node.previousSibling.style.display = style; //section header
scheduler.setLightboxSize(); //correct size of lightbox
}
scheduler.config.lightbox.sections = [
{ name:"description", height:300, map_to:"text", type:"textarea" , focus:true},
{ name:"time", height:72, type:"time", map_to:"auto"}
][/code]
Now if you create new event and it will have text ‘New event’ section will be displayed. But delete text, open lightbox again and section will be hidden.
Best regards,
Ilya
simple i need to show or hide independence have it value or not …
and it concerns only ‘text’ or any type ??? in my case it custom html form
Hello,
Then you need to edit condition (there is always a condition) on which section will be hidden.
In my example it’s
var style = ev.text ? "block" : "none";
Which reads as “if there is something in ev.text when display this section, if not — hide”.
You can edit it, so you can check anything you like (event properties, global flags, user ids and permissions and so on).
Best regards,
Ilya
thanks know better clear view
and for the section “description” to hide i need to
if (somevalue == 'REG') {scheduler.form_blocks.????.set_value = function(node, value, ev) {
node.firstChild.value = value || "";
var style = "none";
node.previousSibling.style.display = style; //section header how to setup section name "description" to hide
scheduler.setLightboxSize(); //correct size of lightbox
}
}
scheduler.config.lightbox.sections = [
{ name:"description", height:300, map_to:"text", type:"textarea" , focus:true},
{ name:"time", height:72, type:"time", map_to:"auto"}
]