Lightbox buttons

Hi

  1. Can I override the labels on the ‘Delete’ and ‘Save’ buttons on the lightbox?

  2. Can I override the behaviour of the Delete button? I don’t want the popup prompt to appear - the event can just be deleted

  3. However, that popup would be useful to me elsewhere, rather than a JavaScript alert box. Is this available for us to call elsewhere in the code?

thanks

and 4: if I add a custom button to the lightbox, how do I reference the event from the onLightboxButton event? The definition doesn’t include it:

void onLightboxButton(string id,HTMLElement node,event e){ … };

Hello,

  1. yes, all labels can be redefined by redefining values in scheduler.locale object
    docs.dhtmlx.com/scheduler/locali … stomlocale

  2. There is no simple way, but you can simply add a custom button that will do deleting the way you want
    docs.dhtmlx.com/scheduler/changi … ttons.html

  3. Yes, dhtmlxscheduler.js embeds dhtmlxMessage widget, it can be used from code
    github.com/DHTMLX/message

  4. You can get the currently opened event using scheduler.getState().lightbox_id
    docs.dhtmlx.com/scheduler/api__s … state.html

Thank you.

For point 4, can I recommend that you include this information in the documentation for onLightboxButton ?

Actually, I’m still having a problem with point (4).

I can access the event as you say through the lightbox_id. But while in onEventSave I can access the new values provided in ev.text (for example), in this button, the values are still as they previously were. How can I access the new values?

(I’m looking to build an alternative ‘Save’ button that then performs additional functionality)

scheduler.attachEvent("onLightboxButton", function(button_id, node, e){
    if(button_id == "custom_btn"){
		var event_id = scheduler.getState().lightbox_id;
		console.log(event_id);
		var evt = scheduler.getEvent(event_id);
		console.log(evt.text);             
    }
});		

You could use “formSection” function to get access to lightbox sections and get values.
Set article:
docs.dhtmlx.com/scheduler/api__s … ction.html