904 Commits

Author SHA1 Message Date
Philipp Memmel
d506b8f6e2 MDL-82793 core: Make modal execute JS from template
Co-authored-by: Huong Nguyen <huongnv13@gmail.com>
2024-10-15 20:52:27 +02:00
Huong Nguyen
756a559024
Merge branch 'MDL-70180-404' of https://github.com/roland04/moodle into MOODLE_404_STABLE 2024-10-08 09:36:38 +07:00
Jose
5a010c604d
MDL-82298 navigation: Add setting data-disableactive on moremenu items
This setting will avoid conflicts between checkmark and
bfcache. The removed function added as part of the MDL-77732
is no longer required as the behaviour on the menu items (including the
secondary navigation) is not altered anymore by the menuItemHelper function
(menu_navigation file).
2024-09-25 22:38:19 +08:00
Bas Brands
e2712c4065 MDL-70180 theme_boost: Allow form autoselect modal overflow
Co-authored-by: Mikel Martín <mikel@moodle.com>
2024-09-23 15:07:34 +02:00
Paul Holden
2a65efd9a3
MDL-82909 javascript: replace custom loading icon with existing module. 2024-09-15 11:11:44 +01:00
Andrew Nicols
ff93557b40
Merge branch 'MDL-80593-404-alt' of https://github.com/HuongNV13/moodle into MOODLE_404_STABLE 2024-08-08 10:19:43 +08:00
raortegar
6e7faf5854 MDL-81718 core: Improve localstorage validation 2024-08-07 04:13:49 +00:00
Paul Holden
dec2143d73
MDL-79568 javascript: remove lang parameter from legacy string calls. 2024-08-05 08:33:19 +01:00
Huong Nguyen
0fe19ee1dc
MDL-80593 core: Make Modal to work with Debug Template Info mode 2024-08-01 10:18:18 +07:00
Ilya Tregubov
0f7d291b9c Merge branch 'MDL-82167-404' of https://github.com/ferranrecio/moodle into MOODLE_404_STABLE 2024-06-26 10:19:59 +08:00
ferranrecio
b2ce12db1d MDL-82167 core: fix reactive debug panel 2024-06-11 16:16:25 +02:00
Pedro Jordao
c0a966d944 MDL-69514 Core: Close popover when modal is closed
Currently in Firefox, if we opened a popover that was inside a modal
and closed the modal by pressing the ESC key, the popover remained on
the screen. With this change, we will ensure that popovers are closed
when the modal is closed.
2024-06-10 12:14:44 -03:00
Jun Pataleta
e69f1b21dc
MDL-81556 core: Fix parameter ordering for prefetchString() 2024-04-16 17:05:23 +08:00
Huong Nguyen
fd38ce1210 MDL-78096 Javascript: core/dropzone improvement
core/dropzone now accepts custom label to display in the Dropzone
2024-04-04 15:31:08 +07:00
Jun Pataleta
281fecbd54
Merge branch 'MDL-78885-main' of https://github.com/rezaies/moodle 2024-03-25 23:37:57 +08:00
Huong Nguyen
c53fc0e0c9
Merge branch 'MDL-79829-main' of https://github.com/laurentdavid/moodle 2024-03-25 09:22:20 +07:00
Mathew May
68bf0f5b77 MDL-78885 comboboxsearch: Points from review 2024-03-22 05:50:06 +11:00
Shamim Rezaie
2ac9dc9108 MDL-78885 comboboxsearch: Deprecate trigger 2024-03-22 05:49:52 +11:00
Shamim Rezaie
1c377fc61e MDL-78885 comboboxsearch: Show x button when user search is not empty 2024-03-22 04:24:23 +11:00
Shamim Rezaie
50eeafeb7d MDL-78885 comboboxsearch: Improve user search and keyboard handling
- Prevent rerendering of the menu when it's already open to preserve the
  selected/highlighted option.
- Allow ArrowUp and ArrowDown to trigger the user search dropdown for
  improved keyboard navigation.

This commit ensures that the menu is not re-rendered when it's already
open, preserving the selected option to enhance the user experience.
Additionally, ArrowUp and ArrowDown keys now trigger the dropdown,
improving keyboard navigation and user interactions.
2024-03-22 04:24:20 +11:00
Shamim Rezaie
8e2555dc48 MDL-78885 comboboxsearch: Switch event listener from 'click' to 'change'
Move from listening to 'click' to listening to 'change'
2024-03-22 04:23:55 +11:00
Shamim Rezaie
bff7c88878 MDL-78885 comboboxsearch: .dropdown() calls should be on toggle element
Introduced the toggle property.
2024-03-22 04:23:26 +11:00
Shamim Rezaie
d886cba9d3 MDL-78885 comboboxsearch: Enable aria.js for auto handling
- Added the `dropdown` class to ensure toggle element focus when the
  dropdown is closed.
- Improved keyboard handling by adding the `dropdown` class.
  aria.js will automatically handle keyboard interactions.
- Removed redundant keyboard handling.
- The "view all results" option is just a normal option in a combobox.
  It should not be treated as the default action for a combobox.
- Ensured correct markup for 'Esc' key handling. aria.js automatically
  focuses on the toggle element if the dropdown's toggle and the
  dropdown menu are wrapped within a .dropdown element.
- Implemented menu closure for outside clicks and when leaving the edit
  box.
- Manually focused on the user search element when opening the search
 dropdown due to a focusLock issue.
- Fix the issue of another dropdown staying open
- Clicking on the clearSearchButton should not close the dropdown
2024-03-22 04:22:24 +11:00
Shamim Rezaie
e0d2a3924e MDL-78885 aria: Automatically trap focus inside dialog dropdowns
- there is no need to set the focus after a dropdown is opened. It is
automatically set as the result of trapping focus.
2024-03-22 04:00:18 +11:00
Shamim Rezaie
d18f7bf5cd MDL-78885 core: combobox should have a valid aria-controls
- The aria-controls attribute cannot refer to an element that doesn't
  exist
- Also update filterDataset so it returns [] when searchTerm is empty
2024-03-22 04:00:15 +11:00
Mathew May
e4083441ec MDL-78885 core_user: A11y fixes for user combobox search
Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2024-03-22 03:26:19 +11:00
Huong Nguyen
b0220f27cb MDL-80850 Javascript: Add new core/dropzone module 2024-03-21 12:45:55 +07:00
Huong Nguyen
34bb16ab27 MDL-79769 core: Tidy up core/togglesensitive 2024-03-12 09:19:58 +07:00
Huong Nguyen
88dc0f5010 Merge branch 'MDL-79769-master' of https://github.com/davewoloszyn/moodle 2024-03-12 09:18:10 +07:00
Laurent David
9497db441a MDL-79829 core: Reactive drag and drop cursor
* When dragging and dropping an item, the cursor should be
set to "move" and not copy.
2024-03-11 09:24:25 +01:00
David Woloszyn
cd935eb3e2 MDL-79769 login: Fix focus loss of loginpageautofocus setting
Added new form event to fix login fields focus loss when DOM is
manipulated by togglesensitive.
2024-03-08 15:54:37 +11:00
David Woloszyn
cb6acfc46a MDL-79769 login: Add password toggle icon to the login screen 2024-03-08 15:54:11 +11:00
Sara Arjona
46e6d412bf
Merge branch 'MDL-80634' of https://github.com/paulholden/moodle 2024-03-07 17:47:20 +01:00
Paul Holden
04f54d8eb0
MDL-80634 libraries: upgrade to version 4.4.2 of ChartJS. 2024-03-07 11:11:14 +00:00
Jun Pataleta
f6a22d3e61
Merge branch 'MDL-80805-main' of https://github.com/sammarshallou/moodle 2024-02-23 17:32:05 +08:00
sam marshall
14b1e93e85 MDL-80805 core_form: Accessibility - add aria-required to form fields
Most types of form field will now include aria-required="true" if the
field is marked as required. This causes assistive technology to inform
users that the field is required.

Before this change, in some cases (e.g. screen reader users tabbing
through fields) users were not informed that a field is required.
2024-02-15 14:30:33 +00:00
Paul Holden
d057af03e9
MDL-79788 tag: convert tag collection page to reportbuilder report. 2024-02-08 16:31:02 +00:00
Justus Dieckmann
216047dc18
MDL-79498 javascript: Adjust get_string function signature
Reflect param and lang being optional parameters.
2024-01-18 10:51:02 +08:00
Ilya Tregubov
1e83b9eba7 Merge branch 'MDL-79985-master' of https://github.com/ferranrecio/moodle 2023-12-20 09:06:08 +08:00
Ferran Recio
02de5b79fd MDL-79985 output: prepare dropdown components for forms
Add new features to the dropdown components (dialog and status) needed
for using them in quick forms. Now the dialog dropdown have methods to
disable the dropdown button (to disable the field). The status dropdown
has one minor style bugfix and the selected item styles are now stored
as a data attribute.
2023-12-19 09:33:45 +01:00
Paul Holden
3019f4e57c
MDL-80393 lang: expose current page language to JS modules.
Since 4be39296 the root HTML element contains the iso6391 language
code of the current language pack. However various JS modules need
access to the original Moodle language pack code, so expose that
in the `M.cfg` structure.
2023-12-19 07:47:15 +00:00
Jun Pataleta
d953068659
MDL-79061 course: Create a sr-only mutations logger
* Create SRLogger that extends from the default Logger class. This
logger outputs the feedback to a sr-only ARIA live region to allow
screen readers to announce the feedback from mutations.
* Update the course editor to use the SRLogger.
2023-12-07 10:43:28 +08:00
Ferran Recio
d8c0e1880f
MDL-79061 core: Mechanism for logging mutation feedbacks
* Create a mechanism for logging mutation feedbacks.
* The mutation feedbacks are displayed as a toast by default.
* Apply this logging mechanism on the course homepage to provide
feedback for the results of actions performed on course modules and
course sections.
2023-12-07 10:43:28 +08:00
Ilya Tregubov
abf2c568be
Merge branch 'mdl67898-check-setting-admintree' of https://github.com/matthewhilton/moodle 2023-11-23 10:25:20 +08:00
Matthew Hilton
9b8acd44d1
MDL-67898 check: Add check admin setting
This admin setting allows you to display a check anywhere in the admin
tree. It uses a webservice to execute the check, so the impact on the
admin tree performance is as low as possible.

Checks do not necessarily need to be registered in the plugins callback
to be shown here, allowing customisation of what is shown in the
settings versus the reports.
2023-11-21 12:04:42 +10:00
Mikel Martín
1a7732b195 MDL-75673 core: Add popper v2.11.8 lib 2023-11-16 17:45:41 +01:00
Paul Holden
58d9babe56
MDL-79629 javascript: native promises enhancing autocomplete module.
Preserve existing `enhance` method return of jQuery style promises to
allow calling code to continue relying on that (e.g. when calling old
style `.done` and `.fail`).

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-11-08 20:05:35 +00:00
Sara Arjona
2fc405aa35
Merge branch 'MDL-79629' of https://github.com/paulholden/moodle 2023-11-08 09:57:30 +01:00
Huong Nguyen
1e256012a1 Merge branch 'MDL-78953' of https://github.com/pedrojordao/moodle 2023-11-07 15:33:29 +07:00
Pedro Jordao
2d73818742 MDL-78953 autocomplete: Add only one empty option when deselecting item.
Each option that was deselected was prepending an empty option in the select.
2023-11-02 18:35:21 -03:00