DHTMLX Scheduler -- Timeline -- readonly.js

Hi,

I just try to use the read only extension, when I tried in Internet Explorer, it works, but when I tried in Mozilla Firefox 12.0, I have this error.

Timestamp: 5/21/2012 5:33:58 PM
Error: this._lightbox_r.parentNode is null
Source File: 10.0.0.123/ls-script/dhtmlxSched … eadonly.js
Line: 8

I get this error when I click the cancel button in detail form.

And, I receive this error from the event that readonly=true,

Timestamp: 5/21/2012 5:36:22 PM
Error: uncaught exception: [Exception… “Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.removeChild]” nsresult: “0x80004003 (NS_ERROR_INVALID_POINTER)” location: “JS frame :: 10.0.0.123/ls-script/dhtmlxSched … eadonly.js :: <TOP_LEVEL> :: line 7” data: no]

Please help me to solve this problem.

Thank you

Hello,

Please provide link where we could check this issue.

Kind regards,
Ilya

Hi Ilya,

Here is the link,

203.125.74.99/bscg-online/www_lj … 49CD768414

Thank you

Hi

Below is there example

Project Type: LJ
Owner Code: ADHOC
Time: 23 Apr 2012 - 29 Apr 2012

Thanks

Sorry ignore last reply,

Below is the correct sample data,

Owner Code: LJ=LUCKY JOINT
Project Type: ADHOC
Time: 23 Apr 2012 - 20 Apr 2012

Thank you,
Budi

So where and what should I click to reproduce this issue?

I’ve created event, got error message from the server, but the lightbox form itself worked ok.

Kind regards,
Ilya

Hi Ilya,

To reproduce the issue,

  1. Change the Owner Code to LJ
  2. Change the Project Type to ADHOC
  3. Click Search button
  4. Go to date between 23 Apr 2012 and 29 Apr 2012
  5. Double click on NAGGAPAN RAMESH event @24/04/2012, you will get the error
  6. Double click on AH WENG event, it show the lightbox, but I cannot close it.

Thank you,
Budi

In my case “owner_code” select is empty, I can’t change to anything (same for all browsers).

Kind regards,
Ilya

Hi Ilya,

You can try again.

THank you

No events found now.

Best regards,
Ilya

Hi Ilya,

I just remove the session checking, please try again,

The events is at 24/04/2012, owner code LJ, wo type Adhoc

Thank you.

Hello,

Can confirm this issue. Readonly extension tries to delete button which is not present (Delete).
Try commenting out

scheduler.config.buttons_right = [];

We will see how it can be improved.

Thank you for this report.

Kind regards,
Ilya

Hi Ilya,

Update me when there is a patch for this.

Thanks,
Budi

Hi Ilya,

After I comment the buttons_right = []; it works perfect. But I cannot show the delete button, is there any other way to fix this problem?

Regards,
Budi

Hello,

Readonly extension itself should remove the delete button.
The original error was caused be extension attempt to remove the button which you already removed by the config option.

Kind regards,
Ilya

Hi Ilya,

I also need to remove the non-readonly event delete button. Can I remove the delete button for certain events?

Regards,
Budi

Hello,

Try using following code:

var default_buttons_right = scheduler.config.buttons_right; scheduler.attachEvent("onBeforeLightbox", function(event_id){ var ev = scheduler.getEvent(event_id); scheduler.config.buttons_right = (ev.readonly) ? default_buttons_right : []; scheduler.resetLightbox(); return true; // lightbox should be displayed });
Kind regards,
Ilya