159 Commits

Author SHA1 Message Date
Jun Pataleta
9573a6f9c1
Merge branch 'MDL-79007_main' of https://github.com/marxjohnson/moodle 2024-03-20 10:45:14 +08:00
Mark Johnson
a64446c2ad
MDL-79007 calendar: Make screen readers read the new month name 2024-03-18 11:25:46 +00:00
Mark Johnson
f419983b32
MDL-79007 calendar: Make screen readers read out calendar day popovers 2024-03-18 11:25:46 +00:00
Mathew May
3d301abcec MDL-73117 calendar: Final deprecation of threemonth_cal 2024-03-11 09:05:10 +08:00
Meirza
edce8cca8b MDL-78850 calendar: course calendar improvement 2024-02-29 12:48:56 +07:00
Huong Nguyen
2bc1598138
MDL-79400 Calendar: Use catch() for native Promise 2023-09-19 09:10:45 +07:00
Andrew Nicols
48bc688ccd
MDL-78324 core: Convert modals to use new static methods
This commit takes all modals which were not using the legacy
ModalFactory.create triggers and migrates them to the new Modal.create
method.
2023-09-09 00:04:11 +08:00
Andrew Nicols
f31f7e34e1
MDL-78324 calendar: Remove unused dependencies
A number of unused dependencies were found in this module, including
some on the ModalFactory and related areas which are currently being
refactored.
2023-09-09 00:04:04 +08:00
Andrew Nicols
af7719682d
MDL-79064 core: Update all get_strings as uses 2023-08-29 10:57:54 +08:00
Andrew Nicols
406623116c
MDL-78306 core: Convert calendar modals to ESM 2023-06-14 21:41:50 +08:00
Andrew Nicols
48c5f01497
MDL-78306 calendar: Remove unused dependencies 2023-06-14 21:41:50 +08:00
Paul Holden
8a6065f5fc
MDL-77858 javascript: correct core/notification exception imports. 2023-04-24 10:44:07 +01:00
Marina Glancy
04f8fdd021 MDL-77164 various: fix javascript AMD module name 2023-04-13 09:43:15 +01:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Paul Holden
a6e45197ca MDL-72523 calendar: return original focus from event modals. 2022-12-28 11:14:38 +00:00
Paul Holden
077a30b7ff MDL-76491 javascript: add missing core/notification imports. 2022-12-02 10:05:28 +00:00
Huong Nguyen
4139046a9a MDL-72430 Calendar: Fix admin cannot edit course event 2022-07-26 11:48:58 +07:00
Andrew Nicols
e1b9d5f3cd MDL-73915 js: Drop support for IE and android
Moodle announced that support for IE would be dropped back in August
2020 with Moodle 3.9 but not active steps were taken at that time. That
decision was made in MDLSITE-6109 and this particular step was meant to
be taken in Moodle 3.10.

This is the first step taken to actively drop support for IE.

This commit also bumps the browser support pattern from 0.25% to 0.3%.
The percentage here includes any browser where at least this percentage
of users worldwide may be using a browser. In this case it causes
support for Android 4.3-4.4 to be dropped, which relate to Android
KitKat (released 2013).

This combination of changes means that all of the supported browsers in
our compatibility list support modern features including async,
for...of, classes, native Promises, and more which has a huge impact on
the ease of debugging code, and drastically reduces the minified file
size because a number of native Polyfills included by Babel are no
longer included.
2022-02-23 08:55:20 +08:00
Andrew Nicols
0a4047ab31 MDL-73915 js: Switch amd minification to terser
Unfortunately the babel minify-mangle plugin seems to be abandoned and
in certain circumstances can be very buggy. The only safe options are to
disable it, or to switch to a different minification library.

Not minifying our javascript is not ideal, so this commit updates the
javascript tasks to use a rollup, combined with babel, and terser.

Babel still converts code from ES/UMD/AMD to AMD modules with the
relevant browser support, whilst terser minifies the code.

The rollup bundler handles tracking and creation of sourcemaps, and
supports better parallelisation of the tasks.

Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core
and eslint, which change the built files anyway, this seems like the
ideal time to make this change.
2022-02-23 08:55:09 +08:00
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Shamim Rezaie
379f15f3b4 MDL-71818 calendar: Fix detection of a click on day link 2021-12-29 19:02:55 +11:00
Dongsheng Cai
41587ffb43 MDL-71818 core_calendar: fix accessibility issues 2021-12-13 00:19:05 +11:00
Dongsheng Cai
cffefca11c MDL-72237 core_calendar: limit number of day events on calenar view 2021-12-03 16:21:30 +11:00
Michael Hawkins
0d644fe4e0 MDL-72810 core_calendar: Remove the three-month pseudo block
This removes the three-month pseudo block from along the side of the
main calendar, and deprecates relevant files/methods which will no
longer be in use.
2021-11-19 18:33:46 +08:00
Eloy Lafuente (stronk7)
6863a92722 Merge branch 'MDL-72013-master-int' of git://github.com/andrewnicols/moodle 2021-10-21 09:25:58 +02:00
Andrew Nicols
349312143d MDL-72013 js: Fix jsdocs to meet stricter eslint 2021-10-21 13:28:00 +08:00
Huong Nguyen
bca6b06a1c MDL-71953 calendar: Accessibility improvement for manage subscription
- Create new web services for manage subscription (Update calendar subscription)
 - Modified delete subscription feature to use Web service.
 - Midified update subscription feature to use in-place editbale
 - Delete subscription feature now have a confirmation box before processing.
 - Fixed some accessibility issues
 - Used 'Delete' instead of 'Remove' for deleting subscriptions
2021-10-21 11:02:34 +07:00
Huong Nguyen
0328241373 MDL-71810 calendar: responsiveness for calendar block
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>>
2021-10-15 10:24:34 +07:00
Eloy Lafuente (stronk7)
962b7f56a8 Merge branch 'MDL-71500-master' of git://github.com/lameze/moodle 2021-08-11 20:10:40 +02:00
Jun Pataleta
8a2c797cc0 MDL-71817 calendar: Set the calendar view mode properly for month view
* Store the view mode of the calendar in the calendar_information
   object.
 * Let the month exporter handle the production of context data by
   moving 'viewingmonth', 'showviewselector', and 'viewinginblock'
   inside it.
 * Set the proper calendar view mode in the core_calendar/month_detailed
   template.
 * Pass the calendar view mode to the
   core_calendar_get_calendar_monthly_view WS function.
2021-07-22 09:04:44 +08:00
Simey Lameze
f0897dce80 MDL-71817 calendar: clicking on day link should redirect to day view
This patch prevents the full day view to be loaded
in the calendar block as this won't be supported.
When clicking in the day link it will redirect the
user to day view in the full calendar.
2021-07-22 08:46:01 +08:00
Simey Lameze
98612827b0 MDL-71817 calendar: only update url on full view
This patch prevents the URL from being updated on the calendar
block. It only updates the url if viewing the full calendar.
2021-07-22 08:46:01 +08:00
Simey Lameze
d2f612ab24 MDL-71817 block_calendar_month: load month view in the block 2021-07-22 08:46:01 +08:00
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