558 Commits

Author SHA1 Message Date
Mihail Geshoski
16b72504b3 MDL-57614 core: Fetch blocks through a webservice in add block modal 2020-12-02 13:43:15 +08:00
Eloy Lafuente (stronk7)
de317c2cd4 Merge branch 'MDL-67513-master-fix' of https://github.com/andrewnicols/moodle into master 2020-11-16 09:17:31 +01:00
Andrew Nicols
78962293ef MDL-67513 core: Only move modal to body if currently attached
A previous change as part of this commitset was intended to move the
modal to the document.body, but where the modal had been destroyed it
was instead added back to the body.
2020-11-16 15:19:32 +08:00
Andrew Nicols
73bd838c1b Merge branch 'MDL-67513' of https://github.com/NeillM/moodle 2020-11-16 08:22:51 +08:00
Neill Magill
524253382c MDL-67513 forum: View conversations while fullscreen grading
Before this change when a modal was shown and an element on the page
was fullscreen the modal would be created behind it.

This change ensures that the modal will be inside an element that is
fullscreen so that it will be correctly displayed.
2020-11-12 08:35:55 +00:00
Jun Pataleta
f0b91724fe Merge branch 'MDL-70072-master' of git://github.com/rezaies/moodle 2020-11-11 22:08:07 +08:00
Sara Arjona
16af4ae4db Merge branch 'MDL-70106-icon-cache' of https://github.com/Peterburnett/moodle 2020-11-10 16:53:27 +01:00
Shamim Rezaie
f0f45c01b1 MDL-70072 core: Fix always displaying date in Gregorian 2020-11-06 19:21:17 +11:00
Andrew Nicols
7d786c7968 MDL-70075 core: Autocomplete selection should always have an active item
Ensure that there is always one active element in the list of selected
autocomplete elements.

Without this we have issues beacuse clicking on the link makes the first
one active if one is not already active, and this turns a click event
into a drag event, which means that it is not deleted.
2020-11-05 08:55:50 +08:00
Peter Burnett
7fe1554c21 MDL-70106 cache: Set icon localstorage cache to use theme localisation 2020-11-04 13:29:53 +10:00
Andrew Nicols
a88838c25f MDL-70075 core: Do not return a value in an event handler
Returning a value of `false` in an event handler has the effect of
calling event.preventDefault() and event.stopPropagation().

This is neither obvious, nor desirable in this situation.
2020-11-04 11:27:55 +08:00
Andrew Nicols
5d16bfcf7c MDL-70075 core: jQuery.attr() does not accept a bool value
The documented values that jQuery.attr() accepts are String, Number, or
null. For some reason, when we pass a Boolean value, the subsequent
click handler does not work in some situations.

Changing this to take a Number, and unsetting it when empty, resolves
this issue.
2020-11-04 11:27:55 +08:00
Andrew Nicols
189a4c8f8e MDL-70075 core: Listen for change in accessibleChange event
The accessibleChange custom interaction event was only listening for
blur and focus, however some OS/browser combinations do not emit these
events until the element is explicitly blurred. This is notably
different on Firefox on some Operating Systems.

Recent changes in MDL-68167 explicitly moved the user participants page
filter module to use the accessibleChange event, which means that the
selections are now only triggered on an explicit blur when using
Firefox. This highlight a bug whereby, when the mouse is used to make a
selection, the event is not triggered until the element is blurred.

This change modifies the accessibleChange event to ignore the `change`
event where it was triggered by the keyboard and where that keybaord
event was not a [return] or [escape] keypress, but to otherwise respect
the native change event.
2020-11-04 11:27:55 +08:00
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