125 Commits

Author SHA1 Message Date
boygr49p
15e311a1fd MDL-71500 calendar_threemonth: clicking in a diff day should refresh day view
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).
2021-07-16 14:46:40 +08:00
Jun Pataleta
a067fc1df1 MDL-71788 calendar: Remove ready state listener
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.
2021-07-15 14:55:16 +08:00
Jun Pataleta
5c70150450 MDL-71788 calendar: Make it easier to copy the calendar URL
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.
2021-07-08 12:33:55 +08:00
Andrew Nicols
4f422785c6 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Andrew Nicols
acd9d9823b MDL-70990 core_form: Replace FORM_SUBMIT_AJAX event
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.
2021-05-26 10:46:49 +08:00
Andrew Nicols
94711c151d MDL-69135 core_calendar: PendingJS for event filtering 2020-06-26 07:58:36 +08:00
Shamim Rezaie
3b3269ee1d MDL-67828 calendar: Fix the js error in IE11 2020-05-27 02:36:55 +10:00
Marina Glancy
d268c5bac3 MDL-58866 core_calendar: separate color for other events, icons 2020-05-19 19:04:15 +02:00
Marina Glancy
1a972b06f1 MDL-58866 core_calendar: allow component events 2020-05-19 19:04:13 +02:00
Andrew Nicols
88f1a81bd6 MDL-68728 calendar: Pending promises for event summary 2020-05-18 13:00:32 +08:00
Andrew Nicols
15d02a3045 MDL-68728 calendar: Remove calendar modal on close 2020-05-18 13:00:30 +08:00
Andrew Nicols
f879cc518e MDL-66109 js: Build changes for NodeJS upgrade
This change includes a build to fix all minified file changes in Moodle
as a result of upgrades to our build process.
2020-05-11 10:55:54 +08:00
Andrew Nicols
47d094817f MDL-68409 behat: Fix tests from modal rewrite 2020-05-04 15:08:11 +08:00
Sara Arjona
e6ef9d3236 MDL-67910 behat: PendingJS improvements for deleteevent modal 2020-03-31 08:40:03 +02:00
Shamim Rezaie
ac0ae31953 MDL-67902 calendar: informative aria label for event days in mini cals 2020-02-25 03:38:35 +11:00
Andrew Nicols
fd58e6dc62 MDL-67152 calendar: Documentation fix 2019-12-10 08:19:12 +08:00
Shamim Rezaie
0ab57f8128 MDL-67152 calendar: Rewrite core_calendar/view_manager using ES6 syntax 2019-12-10 06:46:38 +11:00
Shamim Rezaie
eaa0439eca MDL-67152 calendar: Rewrite core_calendar/repository using ES6 syntax 2019-12-09 23:24:57 +11:00
Shamim Rezaie
f046b70355 MDL-67152 calendar: The day view should start from the current day 2019-12-09 22:37:21 +11:00
Paul Holden
dcab750551 MDL-67140 calendar: fix selector switching between days. 2019-11-05 16:41:12 +00:00
David Matamoros
21ad9531d0 MDL-66354 core_calendar: Notices in error.log on calendar events 2019-09-25 09:08:41 +02:00
Ryan Wyllie
195ea4480b MDL-62497 javascript: build AMD modules with new transpiler 2019-07-19 14:12:49 +08:00
Andrew Nicols
444f85aaa9 MDL-66158 calendar: Events should be space separated not an array 2019-07-16 09:46:02 +08:00
Simey Lameze
e5ab472810 MDL-65671 calendar: add event listener to three month block 2019-06-12 15:54:25 +08:00
Simey Lameze
859bc931d8 MDL-65671 calendar: remove course selector label from exporters 2019-06-12 15:54:24 +08:00
Simey Lameze
4cc9d7c83a MDL-65671 calendar: add listener to day link in month view 2019-06-12 15:54:12 +08:00
Simey Lameze
dbccdae8f5 MDL-65671 calendar: add the calendar view selector 2019-06-10 13:09:57 +08:00
Jun Pataleta
ab709ed274 MDL-65318 core_calendar: Additional fixes
* 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.
2019-05-02 14:19:28 +08:00
Damyon Wiese
260565e305 MDL-64573 output: ajax form event
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.
2019-04-24 16:17:49 +08:00
Simey Lameze
dfc609e55d MDL-60826 calendar: lazy load groups on event form 2018-07-24 07:58:34 +08:00
Ryan Wyllie
60908b2187 MDL-60967 calendar: only load course filter when required 2018-01-09 05:57:38 +00:00
Jun Pataleta
60236650d6 Merge branch 'MDL-60962-master' of git://github.com/ryanwyllie/moodle 2018-01-03 16:53:49 +08:00
Simey Lameze
39cda40590 MDL-61055 calendar: guest user cannot create events 2017-12-19 16:30:08 +08:00
Ryan Wyllie
7884ecf24f MDL-60962 block_calendar_month: load content after page render 2017-12-06 06:21:16 +00:00
Ryan Wyllie
8926030555 MDL-60700 calendar: normalise event type in summmary modal render 2017-11-07 02:08:00 +00:00
Andrew Nicols
d523cbcb26 MDL-60558 calendar: Upcoming should support categories 2017-11-02 11:54:43 +08:00
Andrew Nicols
5c9acb8164 MDL-60558 calendar: Adjust URL change
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.
2017-11-02 11:54:13 +08:00
Andrew Nicols
8242027da3 MDL-60558 calendar: Move edit event to CRUD 2017-11-02 11:53:52 +08:00
Andrew Nicols
fd2f1ae146 MDL-60558 calendar: Remove old SELECTORS 2017-11-02 11:53:49 +08:00
Andrew Nicols
c8419f87c0 MDL-60558 calendar: Harden event link detection 2017-11-02 11:53:26 +08:00
Andrew Nicols
6c3f463dbd MDL-60558 calendar: Move the summary modal to view_manager 2017-11-02 10:56:00 +08:00
Ryan Wyllie
8f730872a7 MDL-59936 calendar: use event colour in summary modal header 2017-10-30 08:34:26 +08:00
David Monllao
7851132177 Merge branch 'MDL-60516-master' of git://github.com/andrewnicols/moodle 2017-10-25 15:16:21 +02:00
David Monllao
5b93dc8539 Merge branch 'MDL-60560-master' of git://github.com/andrewnicols/moodle 2017-10-25 15:06:49 +02:00
Mark Nelson
05ce018002 MDL-60545 core_calendar: ensure 'All courses' shows accurate data 2017-10-24 13:17:14 +08:00
Andrew Nicols
80e4426aeb MDL-60516 calendar: Update mini calendar on course change 2017-10-24 10:43:01 +08:00
Andrew Nicols
9eced5050b MDL-60560 calendar: Correct type of JS event on update 2017-10-24 09:45:27 +08:00
Damyon Wiese
6dc633fd93 Merge branch 'MDL-60058-master-4' of git://github.com/ryanwyllie/moodle 2017-10-16 12:28:59 +08:00
Ryan Wyllie
c56dd950eb MDL-60058 calendar: add visual indicator to UI for valid drop zones 2017-10-13 06:18:44 +00:00