Commit Graph

13 Commits

Author SHA1 Message Date
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
Ilya Tregubov
eaf40e050e MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:48:26 +08:00
Tim Hunt
374d3e7700 MDL-70320 permission overrides: role names were double-escaped 2020-11-25 21:19:57 +00:00
Ryan Wyllie
195ea4480b MDL-62497 javascript: build AMD modules with new transpiler 2019-07-19 14:12:49 +08:00
Shamim Rezaie
f12bc65f1d MDL-64523 core_access: replace .delegate with .on
As of jQuery 3.0, .delegate() has been deprecated. It was superseded by
the .on() method since jQuery 1.7, so its use was already discouraged.
2019-05-25 04:23:41 +10:00
Shamim Rezaie
b1078b18c8 MDL-64523 core_access: Fix js racing issue when overriding permissions 2019-05-25 04:23:33 +10:00
Shamim Rezaie
6786f6b6cc MDL-64523 core_access: Improve the title of the delete role links 2019-05-25 04:08:56 +10:00
Tobias Garske
06ced40c2f MDL-59898 access: Added Icon references. 2017-09-04 09:55:07 +08:00
Dan Poltawski
e7ecb4a90f MDL-57690 js: fix core modal uses in amd
Converting the uses to the AMD modules is a bit risky for now, instead
just require the YUI depdency.
2017-01-26 11:28:59 +00:00
Mark Johnson
4d9036d6eb MDL-55041 roles: Fix JSON parsing in permission manager 2016-07-01 14:54:01 +01:00
Dan Poltawski
7f70d548fe MDL-54939 amd: build modified files 2016-06-17 09:03:18 +01:00
Martin Mastny
2493568970 MDL-38763 core_role: AMD module for managing permissions 2015-09-01 07:31:58 +02:00