745 Commits

Author SHA1 Message Date
Andrew Nicols
3caa6bfbe1 MDL-70075 core: Listen for the focus and blur events again
The `blur` event does not bubble, but the `focusout` events are not
available in all supported versions of Firefox.

Rather than switching event, this patch using event capture to
effectively achieve the same result and bubble the event up through the
DOM to the delegated listener.

There should be no functional change with this patch, except to support
Firefox fully.
2020-11-04 11:27:55 +08:00
Jun Pataleta
e275f0f5da Merge branch 'MDL-70033-master-2' of git://github.com/mickhawkins/moodle 2020-11-03 12:02:08 +08:00
Michael Hawkins
f01c2fa4e7 MDL-70033 core: Update tree.js event handlers to replace stopPropagation
Also added support to allow links to override action keys (enter/space)

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2020-11-03 11:53:57 +08:00
Shamim Rezaie
0438cd60bb MDL-68167 lib: autocomplete focos should not be removed on blur
See https://www.w3.org/TR/wai-aria-practices-1.1/examples/listbox/listbox-rearrangeable.html
2020-10-30 16:01:38 +11:00
Shamim Rezaie
e2ee6025fe MDL-68167 lib: Do not set aria-expanded if it should not be set 2020-10-30 16:01:38 +11:00
Shamim Rezaie
15a349dd4f MDL-68167 lib: The accessibleChange custom event now supports bubbling
The change event bubbles so the accessibleChange shoud bubble as well.
2020-10-30 14:52:52 +11:00
Shamim Rezaie
b643c88682 MDL-68167 lib: Autocomplete selection to use listbox aria role
The aria-selected state cannot be used for the listitem role. The
autocomplete widget highly uses the aria-selected state internally.
2020-10-30 14:43:00 +11:00
Andrew Nicols
931f36ce15 Merge branch 'MDL-69166-master-4' of git://github.com/rezaies/moodle 2020-10-27 12:47:50 +08:00
Marina Glancy
7740c45de4 MDL-69166 core_form: allow modals to prevent closing on accidental click 2020-10-27 14:37:28 +11:00
Michael Hawkins
2660d542c8 MDL-69559 core: Removed stopPropagation from tree click handling
It was preventing JS click event handlers being reached on some
elements, such as course admin items in Classic
(eg download course content for teachers).
2020-10-27 07:52:43 +08:00
Víctor Déniz
c064f06ea1 Merge branch 'MDL-62678-core-fetch-notifications' of https://github.com/brendanheywood/moodle 2020-10-06 22:59:24 +01:00
Brendan Heywood
f3844e595e MDL-62678 core: Improve efficiency of notifications and avoid ajax call 2020-09-30 13:55:30 +10:00
David Mudrák
9ce768008c MDL-69050 lang: Stop using the term blacklist in mustache output engine 2020-09-24 19:41:58 +02:00
Bas Brands
ebfee99d90 MDL-69454 core_search: consistent admin search 2020-09-21 10:15:11 +02:00
Sara Arjona
de1b21a3bf Merge branch 'MDL-69466-master' of https://github.com/JBThong/moodle into master 2020-09-09 11:39:05 +02:00
Thong Bui
f5cb4b9b5e MDL-69466 Autocomplete widget: Improve keyboard accessibility 2020-09-09 13:47:19 +07:00
Mihail Geshoski
775dea63e9 MDL-69525 core: Publish a single event when toggling slave checkboxes 2020-09-01 14:42:15 +08:00
Shamim Rezaie
1e21a0b3d5 MDL-68932 core: showhidesettings to work with multiple hideIf()s 2020-08-05 19:06:08 +10:00
Eloy Lafuente (stronk7)
f8666013b3 Merge branch 'MDL-68390-master' of git://github.com/andrewnicols/moodle into master 2020-07-29 19:34:45 +02:00
Andrew Nicols
4a4a367251 MDL-69215 output: Correct font awesome for themes 2020-07-16 07:29:22 +08:00
Andrew Nicols
eb06f92457 MDL-68390 core: Share focusable selector 2020-07-15 15:15:34 +08:00
Andrew Nicols
7cc18dc2ad MDL-68390 js: Update to use Aria mod 2020-07-15 14:40:49 +08:00
Andrew Nicols
4f1c8ce764 MDL-68390 aria: Add new core_aria module 2020-07-15 14:40:49 +08:00
Mihail Geshoski
e13cbf9e27 MDL-60621 js: Add ability to set a modal to be scrollable or not
With this change the modal can be configured to be scrollable or not.
If enabled to be 'scrollable', the modal's body will become scrollable
when the modal's height exceeds the browser's height. This is useful
in cases where the content in the modal is quite large and extends the
modal beyond the browser's height, which usually results in a bad UI.
If 'scrollable' is not explicitely configured, it will be set as 'true'
by default as in most cases it would be the expected behaviour.
2020-06-30 10:18:19 +08:00
Shamim Rezaie
292a67aede MDL-68991 core: Prevent popup blockers blocking feedback window
Some browsers like Firefox are very inflexible with window.open()
and block it if it is not instantly invoked after the user click.

Also according to https://stackoverflow.com/a/6807615 it is best
practice to replace self:: with static::
2020-06-10 16:10:53 +10:00
Shamim Rezaie
363aaf6eaa MDL-68076 core: log user's click on feedback links 2020-06-04 11:57:26 +10:00
Shamim Rezaie
a3a9539bd7 MDL-68076 core: display the feedback link on footer 2020-06-04 11:57:24 +10:00
Shamim Rezaie
d74a826829 MDL-68076 core: display call to feedback on user dashboard 2020-06-04 11:38:49 +10:00
Jun Pataleta
d5eec2a2fd Merge branch 'MDL-67743-master-final' of git://github.com/andrewnicols/moodle 2020-05-27 14:51:25 +08:00
Jun Pataleta
039fc86902 Merge branch 'MDL-68750-master' of git://github.com/andrewnicols/moodle 2020-05-27 11:03:54 +08:00
Andrew Nicols
1be0f90c6f MDL-67917 core: Add custom template support to autocomplete
Part of MDL-67743
2020-05-27 10:49:43 +08:00
Andrew Nicols
f456195599 MDL-67917 core: Return newly added nodes from template helpers
Part of MDL-67743
2020-05-27 10:49:43 +08:00
Andrew Nicols
89db84b5b1 MDL-68750 core_tag: Add missing confirmation dialogue title 2020-05-26 12:55:29 +08:00
Mathew May
eff7ef2cd2 MDL-68788 core_notification: Check if the user is logged in 2020-05-21 16:33:25 +08:00
Jun Pataleta
f46b5f5f28 Merge branch 'MDL-68463-master-3' of git://github.com/andrewnicols/moodle 2020-05-19 12:24:14 +08:00
Andrew Nicols
bc9426c879 MDL-68528 js: Normalise core component for template strings 2020-05-19 11:40:44 +08:00
Andrew Nicols
ed0328397a MDL-68528 js: Normalise empty component to "core" for string 2020-05-19 11:37:55 +08:00
Andrew Nicols
814da16778 MDL-68463 core: Add helper functions to toggle checkboxes 2020-05-18 20:03:38 +08:00
Eloy Lafuente (stronk7)
036b1beb49 Merge branch 'MDL-68677-master' of git://github.com/andrewnicols/moodle 2020-05-15 01:58:41 +02:00
Sara Arjona
ccc7a30b3e Merge branch 'MDL-68200-master-take2' of git://github.com/rezaies/moodle 2020-05-14 13:10:01 +02:00
Andrew Nicols
84d8b45fdf MDL-68677 core: Enable prefetching when cachejs is disabled
With the templaterev issue resolved we should enable the prefetch module
when cachejs is enabled to avoid a different experience when cachejs is
enabled vs. disabled.

Previously there was little point in doing this due to a range of other
bugs (string normalisation, and misuse of templaterev).

With these issues resolved we should enabel the caching.
2020-05-14 14:10:55 +08:00
Andrew Nicols
b9dec51ab4 MDL-68677 core: Correct usage of templaterev for caching templates
The M.cfg.templaterev variable should only be used to present persistent
caching, not caching of content within the same page load.

Preventing caching of same-page content makes it difficult to develop
for real user experiences as content is slow to load and does not give a
realistic and consistent loading experience.

This change affects the loading of partials specifically which notably
includes the loading spinner. Without this patch the loading icon is
often not seen at all because it does not load in a timely fashion and
the content being loaded is loaded first.
2020-05-14 14:10:55 +08:00
Jun Pataleta
2a202f3b97 Merge branch 'MDL-68529' of https://github.com/Chocolate-lightning/moodle 2020-05-14 12:51:35 +08:00
Mathew May
f2d033a2bb MDL-68529 course: Refactor chooser to include loading 2020-05-12 16:59:54 +08:00
Jun Pataleta
e21252b309 MDL-68200 core: Support fixday/hour for core/user_date's get() method 2020-05-12 10:59:02 +10:00
Shamim Rezaie
127f69d3fe MDL-68200 core: Add calendartype param to user_date.loadDatesFromServer 2020-05-12 10:59:02 +10: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
9b7e6e9c6c MDL-66109 js: Built file changes from new Node version 2020-05-11 10:53:35 +08:00
Jun Pataleta
6a71bccfea Merge branch 'MDL-68524-master' of git://github.com/andrewnicols/moodle 2020-05-05 10:50:09 +08:00
Andrew Nicols
a427a48c10 MDL-68524 core: Prefetch modal registry templates 2020-05-05 10:16:10 +08:00