Andrew Nicols
dbf3bccf99
MDL-77174 core: Add support for button sources to modal utility
2023-07-31 10:56:22 +08:00
Andrew Nicols
715902c9c0
MDL-77174 core: Provide default anchor support to modal utility
2023-07-31 10:56:22 +08:00
Andrew Nicols
96dfb8382e
MDL-77174 core: Provide default strings for modal utility
2023-07-31 10:56:22 +08:00
Andrew Nicols
42d3e7de14
MDL-77174 core: Add getElement to core/normalise
2023-07-31 10:56:04 +08:00
Jun Pataleta
844257a539
Merge branch 'MDL-76046-master' of https://github.com/stevandoMoodle/moodle
2023-07-13 16:51:37 +02:00
Ilya Tregubov
09c7cd98f4
Merge branch 'MDL-73213' of https://github.com/pedrojordao/moodle
2023-07-13 16:49:58 +02:00
Andrew Nicols
3ff84d3eb7
MDL-78316 core: Improve jsdoc typedef for icons
2023-07-07 16:31:54 +08:00
Andrew Nicols
f57af194fb
MDL-78316 core: Update async promises
...
Writing a Promise as:
```
const promise = new Promise(async (resolve, reject) => {
return await 'foo';
});
```
Is equivalent to an IIFE:
```
const promise = (async () => {
return await 'foo';
})();
```
A recent change introduced by MDL-74301 picks this up.
This commit addresses this flagged issue.
2023-07-07 16:23:26 +08:00
Andrew Nicols
5b54ac43b1
MDL-78316 core: Move IconSystem init to Factory
...
This is throwback to times when we understood JS less.
We should not have the factory method for the IconSystem in
core/templates.
2023-07-07 16:13:28 +08:00
Andrew Nicols
c0043004e1
MDL-78316 core: Convert IconSystems to ESM
2023-07-07 16:13:27 +08:00
Pedro Jordao
8658b4937f
MDL-73213 autocomplete: keep selected value when the state changes.
...
The selected value of the dropdown was being cleared when the dropdown
was opened, this was causing an error when submitting the form if the
field was required. The main cause was that we were emptying the
select before loading new values, this solution was created because
of an issue where we could not deselect values if the list was
reloaded. To fix this problem, I added an empty option as the first
element of the select only when deselecting a certain item.
2023-07-06 14:52:18 -03:00
Ilya Tregubov
048edee1e2
Merge branch 'MDL-74301-master' of https://github.com/kabalin/moodle
2023-07-06 09:06:31 +08:00
Huong Nguyen
54d470c313
Merge branch 'MDL-77732-master' of https://github.com/lameze/moodle
2023-07-04 17:10:26 +07:00
Stephan Robotta
1468ecf294
MDL-77732 navigation: fix active flag in navigation for custom menus
...
This is a follow up of MDL-75908 because a Behat tests with the Chrome
driver was failing and it could be traced back to the changes of
MDL-750908. There was no issue with the Firefox driver and
apparently no issue when using the Chrome browser under normal
circumstances.
2023-07-04 17:10:15 +07:00
Stephan Robotta
a617b9f6d7
MDL-77732 navigation: fix active flag in navigation for custom menus
2023-07-04 17:09:59 +07:00
Ruslan Kabalin
572ca40ce7
MDL-74301 eslint: Enable 'reportUnusedDisableDirectives' eslint setting
...
This will warn on unused /* eslint-disable */ statements.
2023-07-03 15:21:53 +01:00
Ruslan Kabalin
80a111d25e
MDL-74301 eslint: Address issues reported by eslint
2023-07-03 15:21:53 +01:00
Stevani Andolo
db76214e5d
MDL-76046 core: Fixed secondary navigation on smaller screen
2023-06-30 06:30:47 +08:00
Mikel Martín
fb49de8875
MDL-78204 core: Add new showmore/showless UI component
...
- Create a new 'showmore' template that receives both collapsed and expanded content.
Initially only the collapsed content will be displayed with a "Show more" button. When it is expanded,
only the expanded content will be displayed with "Show less" button.
- Add 'showmore' component to component library
2023-06-26 09:32:39 +02:00
Andrew Nicols
0dfcb91ca2
Merge branch 'MDL-78350' of https://github.com/paulholden/moodle
2023-06-22 14:29:40 +02:00
Paul Holden
40cc1e53c2
MDL-78350 output: parse returned dynamic tab javascript when loading.
...
Ensure we don't create nested <script> tags when rendering templates,
which triggers console errors since 1ef815cd
.
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-06-21 17:25:34 +01:00
Mathew May
0fb1152345
MDL-78274 modal: Enable modals to be vertically centered
2023-06-21 14:51:26 +08:00
Andrew Nicols
9ce8a9e637
MDL-78306 core: Correct modal jsdoc
2023-06-14 21:52:55 +08:00
Andrew Nicols
af604082df
MDL-78306 core: Migrate core/config to ESM
2023-06-14 21:52:55 +08:00
Andrew Nicols
80780f755a
MDL-78306 core: Convert modal_backdrop to ESM
2023-06-14 21:52:55 +08:00
Andrew Nicols
a571b7c8bf
MDL-78306 core: Convert modal_events to ESM
2023-06-14 21:52:55 +08:00
Andrew Nicols
c6c871e2ce
MDL-78306 core: Convert modal_factory to ESM
2023-06-14 21:52:54 +08:00
Andrew Nicols
77b4d0236f
MDL-78306 core: Provide helper method to register modals classes
2023-06-14 21:41:49 +08:00
Andrew Nicols
fcb6fdf393
MDL-78306 core: Convert core/modal to ESM
2023-06-14 21:41:49 +08:00
Ilya Tregubov
59cd47c02f
Merge branch 'MDL-62859' of https://github.com/paulholden/moodle
2023-06-01 10:12:14 +08:00
Ilya Tregubov
accddabca3
Merge branch 'MDL-77168-master' of https://github.com/andrewnicols/moodle
2023-05-31 10:22:02 +08:00
Andrew Nicols
18dc795907
MDL-78266 core: Simplify string fetching/storing/retrieval
...
Rather than storing strings by an ID, we instead store them by the
string placeholder value.
This means that:
- we can fetch them by placeholder (e.g. `[[_s144]]`) rather than by
index
- we can lazily clean them on fetch
- we only clean them once, rather than on every insertion.
2023-05-25 13:42:15 +08:00
Andrew Nicols
a438e2c72d
MDL-78266 core: Simplify string treatment in core/templates
...
The old handling was extremely convoluted, and likely inefficient.
It's much clearer to use a regex with named groups and loop through in a
standard way.
2023-05-25 13:42:08 +08:00
Andrew Nicols
1ef815cd97
MDL-78266 core: Break apart core/templates
...
This commit breaks apart the responsibilities of the core/templates
module to separate out the different constituent parts. Broadly speaking
these are:
- core/local/templates/loader - responsible for fetching, and caching,
of templates
- core/local/templates/renderer - A Moodle wrapper around the Mustache
engine
2023-05-25 13:42:00 +08:00
Andrew Nicols
16dee82ce5
MDL-78266 core: Migrate core/templates to esm
2023-05-25 12:09:46 +08:00
Paul Holden
c5d1f72dca
MDL-62859 javascript: replace user preference calls with new methods.
2023-05-22 13:51:39 +01:00
Andrew Nicols
2078efeca9
MDL-77168 core: Allow core/utility alerts to submit forms
2023-05-12 15:21:20 +08:00
Michael Hawkins
2e024f304a
MDL-75316 core: MoodleNet integration final improvements
2023-04-18 17:00:54 +08:00
Huong Nguyen
58ced4add0
MDL-75316 core_moodlenet: Share to MoodleNet modal and activity menu
...
Originally implemented as MDL-75785
2023-04-18 17:05:07 +08:00
Marina Glancy
04f8fdd021
MDL-77164 various: fix javascript AMD module name
2023-04-13 09:43:15 +01:00
Marina Glancy
a507a9e68a
MDL-74465 blocks: changes for backward-compatibility
2023-03-30 12:15:55 +01:00
Marina Glancy
6b081d2e9f
MDL-74465 blocks: allow configuration in modal
...
Introduce 'pagehash' - an identifier that uniquely identifies a page for the user session
2023-03-30 12:15:54 +01:00
Simey Lameze
61f4843fed
MDL-77721 navigation: Revert the patch for MDL-75908.
...
This reverts commit 7b8fa9de86
.
2023-03-23 15:45:11 +08:00
Ilya Tregubov
cc35edd595
Merge branch 'MDL-76914-master' of https://github.com/meirzamoodle/moodle
2023-03-17 13:04:35 +01:00
Stephan Robotta
7b8fa9de86
MDL-75908 navigation: fix active flag in navigation for custom menus
2023-03-15 11:16:44 +01:00
Meirza
170561ee94
MDL-76914 libraries: upgrade Chart.js to 4.2.1
2023-03-13 08:53:26 +07:00
Jake Dallimore
3f8994c07d
Merge branch 'MDL-77517-master' of https://github.com/juancs/moodle
2023-03-10 11:38:11 +08:00
Jun Pataleta
8441270181
Merge branch 'MDL-77559-master-2' of https://github.com/andrewnicols/moodle
2023-03-09 16:02:01 +08:00
Andrew Nicols
511401f4f6
MDL-77559 js: Rebuild all JS with Node 16
2023-03-09 09:53:19 +08:00
Ferran Recio
5e445c0e3a
MDL-77420 core: fix modal close button on remove on close
2023-03-07 13:13:44 +01:00