Checkbox and Resizing through custom view

Hello,

After some time I got back to this calendar code.

I got some great answers here last time about showing only events for the current quarter and that all works out

What I have is a 2U layout where 75% of the left side of the screen is an list of events.
and the other 25% on the right is showing 3 mini calendars with the months for the current quarter.

I’m running into some issues and I don’t know how to fix these :astonished:

1:
Whenever I resize my browser it tries to do the resizing but it comes back with an error:

Uncaught TypeError: Property 'dnbevent_scale_date' of object #<Object> is not a function
scheduler._render_x_headerdhtmlxscheduler.js:1217
scheduler._reset_scaledhtmlxscheduler.js:1253
scheduler.update_viewdhtmlxscheduler.js:1189
obj.updateNestedObjectsdhtmlxcontainer.js:154
setSizesdhtmlxlayout.js:2180
_doOnResizeEnddhtmlxlayout.js:147
(anonymous function)

What is going on here (my custom view is called ‘dnbevent’

2:
in my index.html i use a checkbox in my event lightbox:

{ name:"plaza", height:25, map_to:"event_plaza", type:"checkbox"},

What it should do is whenever this checkbox is checked it should make a link of the whole event (which works) but the problem is it does not see if it was checked or not.
I’m writing my data to a local xml file and the the XML data does have ‘true’ on some of the events.
but when I reload the agenda, it removes the link but it’s still loaded as ‘true’
somehow it either does not remember the setting or i’m checking the boolean on the wrong place
(in my dnbevent view js file)

3:
The mini calendars on the right do not react to my clicks in a sense that it does not switch the events to the selected date, I can browser through all the months but it does not change the shown events based on the selected date

I would like to share the code, but I think it’s to much of a mess for anyone to understand (which is a shame)

Hello,

Does resizing works correctly on other views?

How do you decide if event should be a link or not (code itself)?

Have you checked the scheduler\samples\05_calendar\04_layout.html sample?

Kind regards,
Ilya

Thanks for answering Ilya, you helped me allot with the Quarter of a year time :smiley:

Resizing does work in other views, what I did was made a copy of ‘agenda_view’ and edited the name of the views to dnbevent, but I’m thinking of completely replacing the agenda_view but leaving the names to see if that works (doing this right now)

I fixed this one, I did a wrong if else statement on a place where it was to late, changed it to a switch/case much earlier (and in a seperate handler) and this is fixed.

I’ll do that to, but I’m hoping that my adventure for problem #1 will fix most of these things too :smiley:

I’ll let you know

Small update.

I reworked a different view (Like I said I used agenda_view as my base to create a custom view)
I remade the file, and this time carefully checking each new functionality before going on with the next.

My resize issue is resolved, the view does not go blank anymore when resizing the browser.
As mentioned before my second issue was fixed already.

My third one is not fixed yet, but I found out that it had nothing to do with the functionality of the view or the mini calendar.
it’s the way I configure it to view, it ignores my request because the View always thinks that displaying the events for the current quarter is a priority (which it is)
So I’ll have to rework that a bit!

All to do now is design the whole thing, fix my date issue and fix the export to pdf issue (nbsp error?)

Anyway, Thank you Ilya for taking the time to answer you put me on the right track again with your comments on the 2nd and 3rd problem!

Kind Regards,
Patrick