Including in this commit:
- Modify the UI to make the section dropzone more visible
- Prevent the direct image dragging in Chrome, Safari by improving the check
Adapt the current course editing libraries to modify also
the course state data. This way, any UI component that
watches the course structure can react to the changes.
The `types` object introduced in Moodle 3.11 has been replaced with the
`eventTypes` object which is used consistently across all CustomEvent
definitinos.
Likewise the trigger functions have been renamed from
`triggerUploadStarted` to `notifyUploadStarted` and from
`triggerUploadCompleted` to `notifyUploadCompleted`.
Backwards compatability is maintained.
When adding media via drag and drop, the notifyFilterContentUpdated
event should be called after the item is added to the DOM. This allows
things like videojs for example, to process the new content.
We don't need to set up anything specifically for toolboxes any more, but
other third-party JS may require additional setup following new module
creation.
The following changes have been made:
* course_section_cm_edit_actions now allows the caller more options for the
display of the action menu.
* The site menu block now disables the JS enhancement of the actionmenu so
that it displays as it did before. After more testing this seemed like the
only option that worked in the limited space of the block when it had
several modules.
* draganddrop of resources now triggers the action menu enhancement as well.
* Fixed display of title when the menu is not being enhanced by JS.
* Fixed the alignment of the completion icon in the bootstrapbase theme.
* Tweaked the CSS for the standard theme.
Switched to Moodle-style dialog boxes (thanks Andrew for the pointer)
Enter button now submits the form (from within the 'name' field)
Upload button is disabled when the name is empty (if the name is required for the selected handler)
Dialog now has 'What do you want to do with this text?' and 'Name' for the text
Entire course section now has a class added when you drag over it (to enable it to be styled in the future)
Radio buttons have unique IDs, matching the label IDs
'What do you want to call this text' input moved down and disabled when 'label' selected
'Add page here' changed to 'Add text here'