dhtmlxScheduler 3.5 Beta version [New White skin included!]

Hi,

I have the following collisionproblem

I have 2 timelines with 2 different sections (staff, studio).
Every event has to be attached to any section. Then I want that there is no event collision between “staff” and “studio”, this means, every studio and every staff is available in a timeslot only once. If there is a collision I want to see a messagebox (confirm), so that I can decide if the collision is ok or not.

When I am using the following code:

    scheduler.attachEvent("onEventCollision", function (ev, evs) {
        for (var i = 0; i < evs.length; i++) {
            if (evs[i].welchesstudio == ev.welchesstudio && evs[i].id != ev.id) {
                return confirm("Collisionstudio! Sure?");
            }
            for (var i = 0; i < evs.length; i++) {
                if (evs[i].welchesstaff == ev.welchesstaff && evs[i].id != ev.id) {
                    return confirm("Collisionstaff! Sure?");
                }
            }

I get the confirm-message for every colliding event twice - this means if there is a "staff"collision I get two times confirm(“Collisionstaff! Sure?”);

The next thing is, if I switch to Timline-View and section “staff” and if there is on creating a new event a collision with “studio” I do not get a message. The same other way around. If I have the timeline-studio-section as the active view, I do not get a message about a staff-collision, when creating and moving an colliding event.

And when I create in a timeline-view (no matter which section) a new event - and now it comes - press in the lightbox “save” with the mouse and not just press enter, I have a collision warning, even if there is no collision.
That’s strange. And this is only in the timeline-views, in day/month/year I don’t have that…

Thank you!
Martin

Hello, choubaka35.

There is no such sample in the package (but it was there in 3.0, probably should be restored). Though there is 02_customization\18_combo_select_from_db.html.
What are the steps to reproduce this issue?

I click on Delete button in menu and it works just fine.

Thank you for your help.

Kind regards,
Ilya

I have 2 questions/suggestions about marked timestamp.

First, is it possible to verify if a timestamp already exist when using the addMarkedTimespan function so it’s not added twice. If not, it would be nice if we could add our own Id for the timestamp or the function could verify if there is one already created for the same timestamp.

Second, is there a way to render the timestamp when you add it with the addMarkedTimespan function. The markTimespan function is doing it but it’s not saving the data so when you resize the browser or anything else the timestamps are gone.

thanks

Hello, xspy8.

addMarkedTimestamp returns id, so if you can match it with the marked time you can use it. But overall - if you don’t want marked timespans to collide - why not to remove all marked timespans for the particular date (day/range)?

Simply refresh view after you’ve done adding all the marked timespans.
scheduler.setCurrentView();

Kind regards,
Ilya

hey,

Yeah i guess i could simply delete all timestamp.

The problem that i have here with this solution is that i’m currently listening to “onViewChange” to trigger calls to the servers to get my events and my timestamps so on callback i’m adding my events with the parse function and adding my timestamp with addMarkedTimestamp. So when i’m done adding my timestamps and i’m calling setCurrentView i’m falling in an infinite loop because it’s triggering “onViewChange”.

thanks for your quick answer

Download updated version and use

scheduler.updateView();

This won’t call any events.

Kind regards,
Ilya

Hello Ilya,

For example, see the attached file.

Kind regards.


Hello,

Got it. The issue was caused by the old sample which you copied from the 3.0 package to the 3.5

In the updated version there is no need to include dhtmlxcommon.js file, so it should be:

[code] …

<link rel="stylesheet" type="text/css" href="../../../dhtmlxcombo/codebase/dhtmlxcombo.css">
<script  src="../../../dhtmlxcombo/codebase/dhtmlxcombo.js"></script>[/code]

Thank you very much for your feedback.

Kind regards,
Ilya

Hello,

Thank you very much, it works fine. :smiley:

Kind regards.

Thanks Ilya. That fixed it!

I forgot i wanted to ask if there was a reason why you are looking only for “DIV” in the get_elements function (line 1968 of the latest debug file). The reason is that we are using bootstrap to skin our scheduler and we are using button not div for things like previous/next and today button, example:

<button class="dhx_cal_today_button btn btn-mini"></button>

So when you get the elements at the initialization the button are not added and not working.

On my side, i changed it for “*” so it’s getting all elements, but i thought it might be helpful for other people.

Hello,

There is no particular reason. It was simple made so long time ago. All those elements could be reimplemented using API or even removed.

Best regards,
Ilya

Found something buggy, steps to reproduce:

  • Configure your calendar to be readonly

  • Make sure you have added week agenda

  • Start calendar in week view

  • Go to week agenda click on a visit

  • Go back to week view, the “details/edit/delete” menu will now be visible even though calendar is readonly.

Going back to agenda and clicking another visit will move the details/edit/delete popup to the now clicked visit.

Same applies for going Week Agenda - Day view
Does not affect Month view in any way (wont show and wont reproduce)

Hello, Flyn.

Thank you for the feedback :slight_smile:
Should be fixed in the updated version.

Kind regards,
Ilya

I noticed dhtmlxscheduler_touch.js and dhtmlxscheduler_touch.css are no longer in the code base. We use that for tablet themes. Will you still be including that in the final release?

They are available as standalone package
dhtmlx.com/blog/?p=1604

Actually, I’m NOT referring to the new Mobile platform. I’m referring to the full version of Scheduler (with units, timeline, etc.), with a tablet css, and tablet scroll-ability. See screenshot.


We are working on separate solution for ipad.
For now you can use new “white” skin, all controls in it have increased size, so it must be easily operable on the touch device.

Go to dhtmlxScheduler_3.5_Beta_20120724\samples\06_timeline\03_tree.html

Try to resize/reschedule any event.

Error: start_date is null or not an object in dhtmlxscheduler_timeline.js

Regards,
OT

Hello,

Package updated.

Kind regards,
Ilya