Disabling Custom Icon From Lightbox

Hi,
I have created some custom icon(search icon) in lightbox,i want to disable it in readonly mode,can you give the idea of it.

Regards,
Surya Dwivedi

Hello,

Try something like the following code:

scheduler.attachEvent('onLightbox', function(event_id) { if(scheduler.config.readonly_form || scheduler.getEvent(event_id).readonly) yourButton.disabled = true; else yourButton.disabled = false; });
Or you even can remove the button.

Best regards,
Ilya

Thanks

Hi,

As mentioned above I have added custom button as like below.

scheduler.config.buttons_left=[“dhx_save_btn”,“dhx_cancel_btn”, “dhx_start_btn”];
scheduler.locale.labels[“dhx_start_btn”] = “Start”;

I am not able to get the custom button object in the below script.

scheduler.attachEvent(‘onLightbox’, function(event_id) {
dhx_custom_btn_start.disabled = true;
scheduler.config.buttons_left.start.disabled = true;
scheduler._lightbox.getElementsByTagName(“dhx_custom_btn_start”).disabled=true;
});

All the above options shows javascript error.

Can anyone please let me know how we can get the button object.
Also please let me know how we can disable/remove the button.

On clicking the custom button I need to write some logic. I have used “‘onLightboxButton’” event. But I am not able to get the event object.
How do we get the event object using the below script

scheduler.attachEvent(‘onLightboxButton’, function(id, node, e) {
alert(id);
alert(node);
alert(e);
});

PS: I have attached my lightbox popup.

Thanks,
Vijay

Hi,

Anyone please help to resolve the above mentioned issue.

Thanks,
Vijay

How do we get the event object using the below script

var id = scheduler.getState().lightbox_id; var event = scheduler.getEvent(id);

I am not able to get the custom button object in the below script.
This is a bit problematic, as scheduler doesn’t create any special objects for the buttons. After rendering it is just a div tag with dhx_start_btn css class

Thanks for your reply Stainslav.