New-look calendar bug

omo66 wrote on Monday, August 25, 2008:

Hi all,
After creating events (new fancy or outlook calendar selected) I can not select time slots ( no hover effect on day view).
If the week view is selected then the hover effect on time slots (e. 15min) is active.

How could I make day view hover effect active? is this a bug?

Thanks

penguin8r wrote on Thursday, August 28, 2008:

I’ve noticed this problem too, on 2 fresh v2.9.0 installs & also on an upgrade from 2.8.4-dev to 2.9.0, no luck fixing it yet tho  :frowning:

light_coder wrote on Friday, August 29, 2008:

This is not a bug.
Apparently, this was intended by the author of the code as you can see in the following code taken at (or near) line 347 of this file ajax_template.html located in openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/:

// can’t have a link to new appts since we may have multiple providers displayed
    //echo “<a href=‘javascript:newEvt($startampm,$starttimeh,$starttimem,$defaultDate,$providerid,$in_cat_id)’ title=‘New Appointment’ alt=‘New Appointment’>”;
    echo “$disptimeh:$starttimem”;
    //echo “</a>”;

The author explained why he did it. If you have multiple providers displayed, they are listed horizontally (one next to each other). The time slots column does not repeat itself for each provider (like in the old style), therefore clicking on a time slot for a new appointment would not make much sense and things would be out of sync.

If you need to have the time slots linked, simply un-comment the code above.

You could also modify the code so that multiple providers are displayed vertically (one on top of each other), repeating the time slots column with each provider. In this case, the linked time slots would correspond to the right provider.

Jude.

omo66 wrote on Wednesday, September 03, 2008:

Hi Jude,

I did  uncomment that section of code as above.
The time slots are now active with mouse hovering effect but when you click on one time slot nothing happen.
What is next code to change.?
Where is the link to events window
Please advise

Thanks to all

cfapress wrote on Monday, September 08, 2008:

Hi,

I’m the one that made that code decision. Very often users will look at several providers at once in the day-view. Then, if you were to click on a time slot in the day-view, which provider would be the default in the ‘new event’ window? Perhaps the answer is to simply blank out the provider in the ‘new event’ window for every new event. That way users will always be forced to choose a provider from the list. Or perhaps default to the first provider of the those selected?

My original intent was to keep some consistency in the new event window at the sacrifice of inconsistency in the calendar view. In retrospect this wasn’t the best decision and needs future review.

=====
Omar, the first of those commented out lines needs to be corrected. Here’s the proper syntax:

echo “<a href=‘javascript:newEvt($startampm,$starttimeh,$starttimem,$Date,0,0)’ title=‘New Appointment’ alt=‘New Appointment’>”;

Minor difference in the parameters passed to newEvt.

*** If you do use this fix please be sure your staff is highly aware of changing the ‘provider’ select box when creating a new event.

Jason

PS - Jude, thanks for helping out!