Clicking in a day in the three month block replaces the div with id starting
with calendar- so we can do so repeatedly and successfully and test that it does (with behat).
Adding a document ready state change listener might be too late by the
time this AMD module gets loaded. So there's really no point listening
for it. It's better to enable the Copy URL button by the time this
the calendar export module gets loaded since at this point, the
copy to clipboard JS module would have been loaded as well.
Converted the Calendar URL string to a read-only text input containing
the calendar URL. Pressing the "Copy URL" button will copy the calendar
URL to the clipboard.
Fixed Behat tests as well for the export feature. With the calendar URL
in a text input that clips the whole URL, the `preset_what` URL
parameter cannot be seen by the "I should see" step. Worked around
this by checking that the actual value attribute of the calendar URL
text input contains the preset_what parameter.
Plus: Deprecate the calendarurl string. It will be replaced by a new
lang string that does not contain the actual calendar URL.
The legacy M.core.event.FORM_SUBMIT_AJAX ecent has been replaced with a
new core_form/events::formSubmittedByJavascript native DOM event.
The new event can be listened to at any point in the DOM using the
following syntax:
```
import {eventTypes} from 'core_form/events';
document.addEventListener(eventTypes.formSubmittedByJavascript, handler);
```
A backward-compatabibility layer is included to ensure that any
legacy YUI event triggered on a form is still respected and the new
native event is also fired.
A similar handler is also included to ensure that any legacy YUI event
listener is still called with the same arguments.
These legacy bridges will be removed after Moodle 4.3.
* Move 'calendareventtype' property to event_exporter_base and
rename it to 'normalisedeventtype'
* Add a 'normalisedeventtypetext' property to event_exporter_base
for displaying the human-friendly text for the normalised
event type.
* Clean up calendareventtype from other exporter/template locations
* Fix template names.
Add an event that can be fired when an mform is about to be submitted via ajax.
This allows custom field types to perform an action when the form is submitted.
The atto text editor will reset any autosaves when the form is submitted.
The URL change belongs in the calendar_view, not the view_manager.
The view_manager is responsibe for updating the view, not for the
resultant actions from it.
This also changes to use pushState so as not to overwrite the current
location in history.