Full calendar testing for frontend VIEW access only

wezetel

Active Member
Found some time for testing.
The initial aim of my tests is to get a calendar visualisation with just a view access for the frontend. Entries should be done in the admin interface only.

Basic configuration:
Fresh Joomla 5.14 Installation
Extensions: JCE Pro 2.9.81, Fabrik 4.3.1, Fullcalendar 4.3.3
fullcalendar.js updated on line 371 to
FabFC.clickEntry(eventClickInfo.event.extendedProps);
(debugJS enabled in Fabrik Options)

Created an Events (and Elements) list with view access for public, all other accesses are restricted for admins.
Created a fullcalendar visualisation. Set to read only under 'Options' and 'Month view options'.
Linked elements of list to visualisation data

First case:
Under Options -> Show full details select 'No'
Result:
  • if clicking on the events label an empty popup appears.
  • 1727976258341.png
  • if clicking on the events bar nothing happens (even if the pointer changes to a hand)

Second case:
Under Options -> Show full Details select yes
Result:
  • if clicking on the events label two popups appear: one empty and the other with the Details view.
  • 1727976703266.png
  • if clicking in the events bar (not the label) a popup with the details view (which is, what I would expect)
  • 1727976506037.png
 

Attachments

  • 1727976458003.png
    1727976458003.png
    29.8 KB · Views: 2
this behaviour is already there for some years. On one of my sites I have Fullcalendar 4.1 and it reacts exactly the same.
 
I assume this is on a test site? Can I get an akeeba backup of it, I can probably fix this issue. pm me the details to get it if possible.
 
It's replicatable (tested with old fullcalendar), just set Show Full Details =yes in Options.

It's related to a cklick on the label (displayed as a link even if element's link to details=no, why?)
It's ok if you click on the time part (or if you don't select a label element).
 
I have your backup restored. Interesting behavior. I see what is happening. Will spend some time on it tomorrow.
 
I have part of it fixed, but I am struggling with the correct handling based on the options. Here is where I need input:

HTML:
            Show    Read    Result
Action      Full    Only
=============================================
Click         N      Y       Simple View - read only
Click         N      N       Simple View - edit/del buttons
Click         Y      Y       Full Details - read only
Click         Y      N       Full Details - Edit mode
Dbl-Click     N      Y       ??
Dbl-Click     N      N       ??
Dbl-Click     Y      Y       ??
Dbl-Click     Y      N       ??
Are the single click actions correct? What would the Dbl-Click actions be?
 
Last edited:
Not sure, if Dbl-Click is needed at all. All results are in a modal-window, correct?
Quick thought, but not finally thought to the end:
  • Hover action opens a modal window.
  • Click opens the according list entry.
Any other comments welcome
 
Behaviour in the "old" fullcalendar:

Dbl-Click is for adding.

Readonly:
If yes, users won't be able to add events on the calendar, no matter what the setting in the associated list is. If you select a label element above, the label will be shown but the link to the detail view will be disabled. Useful if you want to force users to enter event through a form and not directly on the calendar.

So if ReadOnly=no (and user can add) then Dbl-Click = Add, else Dbl-Click doesn't do anything.

If ReadOnly = no in Options, MonthView can be set to ReadOnly = yes which will stop the Dbl-Click in the MonthView (but Add button will still be shown)

HTML:
            Show    Read    Result
Action      Full    Only
=============================================
Click         N     Y or No      Simple View - view/edit/del buttons
Click         Y      Y or No      Full Details view

If you select a label element above, the label will be shown but the link to the detail view will be disabled.
This part is obviously not working, already the same in F3 (at least with php8). You can always click to show the simple view with buttons resp. the details view.

Question: Do you want to keep this behaviour?
 
Last edited:
At this point I am deep into it so let's pick the behavior we think is correct. We can also add options to define the behavior in some cases.

In the past, DBL-Click on an open space opened the Add Event Window (assuming it was allowed). I was thinking that single click of an event would open the simple window with the add/del/view-details btns, and a double click of an event would open the Edit window. But, it could be in this case that a dlb-click with show full disabled would open the Full Details View. I'm rambling, too many options.

If we can define the preferred behavior I can implement it.
 
Not sure what would be the most logical behaviour.

HTML:
            Show    Read    Result
Action      Full    Only
=============================================
Click         N      Y       Simple View - read only
Click         N      N       Simple View + view/edit/del buttons
Click         Y      Y       Read only = Details view
Click         Y      N       Edit mode = Form view, if edit access, otherwise details view;
                    ie. analogue to list links

Dbl-Click ReadOnly=No in week or day view
Opens add form with start element set to clicked date_time.
It's possible to have multiple events with the same start date_time, so Dbl-Click on existing event should also open Add form (as it is now).​
Dbl-Click ReadOnly=No in month view:
add​
 
And while we are discussing options:
It would be nice to have a "Target" option for the custom link.
In case of showing the calendar in a module position it's useful to open a custom link (can be e.g. the associated form) in the same window and not always opening a new one.

I had a pretty hacked fullcalendar version on one of my old F3 sites with e.g. a custom link with target and a URL param to set the calendar default date
 
Last edited:
I'm still struggling to understand all options, which where available in the past.
Eg. if you made a Dbl-Click on an empty space to create a new event, but you had defined multiple data sources (lists), it isn't clear for me, which one of the sources was picked..
 
If you have multiple lists defined in your viz you'll be asked to which one you want to add.
(no matter if dbl-click or Add button)

1728369715322.png


I think the WIKI needs an update anyway, it's still referring to the old-old calendar plugin.
So after the new/old options are defined/corrected there would be a good time to do it.
 
I'm happy to see this work in progress.
I've been using Full Calendar for many, many years now. There was a time that it work well. In Joomla 3.x?
But after one of the update, maybe to J3.9 behavior changed.
It is still an essential component on 2 of my sites, and I want it to be on a new site as well.
Till now I only used
Click Y Y Read only = Details view
and that will not change for the two existing sites, but maybe I like to add i9n the new site some Add type.
I have to confess that I was not aware of the possibility.
So, looking forward, thanks for all the effort you are putting in.
menno
 
Quick question: Do these display options need to be by data source or strictly for the entire visualization? Right now they are by visualization. I can see a case though where a user has viewing rights to more than one data source, but add/edit/delete to specific data sources.

Also, I can see the case where add/edit/delete could be restricted by specific users, i.e. add/edit/delete only their own events.

I am in here deep now, I might as well do what will really help the usefulness of the viz.

Any thoughts?
 
View/edit/delete buttons in the simple popup are only shown depending on the user/list access.
 
True, but I can envision cases where a user may not have view rights to the calendar entries for specific data sources and if that is the case then the data source should (optionally) not show up on the calendar.
 
So, I think we are in agreement on the click behavior in the above post from @troester

Regarding double-click actions, a dbl-click in an open area of the calendar opens the add-event window (if permitted). I propose also for the click N-N option a dbl-click of an event opens the edit window directly rather than going through the simple popup.

Do any of these need/want a configuration option?

I think I will add a configuration option to show/hide data sources based on user access to the list. I imagine some customers would want to still show the slots used but not allow further viewing of any details.

I think I will also add an option for allow edit (we already have one for can add), i.e edit any or only edit their own.

Followup revisions before I jump in?
 
Also, @troester do you want an option for the target and if so what would the options be for it and how would that affect any link created? Would this be for all links or only certain ones, and applicable for all views, i.e main calendar or module?
 
Back
Top