231 Commits

Author SHA1 Message Date
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Mihail Geshoski
ee2d1f806d MDL-75513 message: Enable optional text display in the contact toggle 2022-11-02 17:45:52 +08:00
Andrew Nicols
dc50ea7d3a MDL-75936 core_message: Migrate message_drawer_helper to ESM 2022-10-24 14:29:32 +08:00
Andrew Nicols
723d450c8c MDL-75936 core_message: Drawer must be ready before firing drawer events
This commit addresses a race condition when showing the message drawer
and opening the settings page from the Message preferences page.

In that situation, the message/edit.php page calls the
message_drawer_helper.showSettings function, which publishes a request
to show the drawer.

In some conditions (notably faster machines, or after MDL-66107) this
event is fired before the message_drawer.init has listened to it.

The solution here is to delay firing of the event until the drawer
announces itself as ready.

This ensures that the event is subscribed to before it is fired.
2022-10-24 14:29:32 +08:00
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
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Pau Ferrer Ocaña
d74bd798b6 MDL-67853 message: Remove on/offline settings on message preferences 2022-01-27 15:22:15 +01:00
Andrew Nicols
349312143d MDL-72013 js: Fix jsdocs to meet stricter eslint 2021-10-21 13:28:00 +08:00
Paul Holden
b95dd8c5db MDL-72071 message: preserve window scroll opening processor modal. 2021-08-31 11:57:30 +01:00
Andrew Nicols
4f422785c6 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Paul Holden
58501c742f MDL-65616 message: always notify user after sending contact request. 2021-03-15 18:56:36 +00:00
Paul Holden
776863806f MDL-70880 message: preserve window scroll when close message drawer. 2021-02-14 19:27:10 +00:00
Paul Holden
5d778a7646 MDL-65135 message: use full date in messaging drawer for old messages.
Messages sent in previous years will now include the year portion of
the date string.
2021-01-14 08:01:07 +00:00
Bas Brands
35bd8622f7 MDL-69878 core_message: always show message drawer close icon 2020-11-11 15:39:16 +01:00
Mathew May
ee94aded30 MDL-63261 messaging: Final 3.6 deprecations 2020-09-07 09:10:46 +08:00
Adrian Greeve
b713aa80b4 Merge branch 'MDL-68423-master' of git://github.com/ferranrecio/moodle 2020-08-13 11:02:04 +08:00
Ferran Recio
1d8cbfb81b MDL-68423 message: avoid self-xss when send a message 2020-07-20 19:48:17 +02:00
Andrew Nicols
7cc18dc2ad MDL-68390 js: Update to use Aria mod 2020-07-15 14:40:49 +08:00
Andrew Nicols
c225a42c19 Merge branch 'MDL-67700-master' of git://github.com/ferranrecio/moodle 2020-05-22 10:51:31 +08:00
Ferran Recio
778846987a MDL-67700 message: prevent async loading conversation message mix 2020-05-21 18:02:42 +02:00
Bas Brands
92bc86e429 MDL-68299 theme_boost: theme updates for accessible zoom
The Moodle UI should be functional in a viewport of 320px by 256px to
meet WCAG 1.4.10

this patch contains improvements to:
-prevent horizontal scrolling
-better wrapping of page header
-message drawer funtional on tiny screens
-remove indenting on courses
-prevent elements overlapping on quiz editing
-better navigation tabs
-fix colour picker
-quiz editing
2020-05-19 10:13:20 +02:00
Ferran Recio
99374e7e14 MDL-67700 message: correcting conversation timer reset 2020-05-19 08:38:26 +02: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
Andrew Nicols
7be118e265 Merge branch 'MDL-67881-master' of git://github.com/bmbrands/moodle 2020-05-05 11:17:33 +08:00
Jwalit Shah
d743aaf262 MDL-66035 message: Restore missing message preferences files 2020-04-27 09:48:41 +10:00
Bas Brands
45decc81c4 MDL-67881 core_message: fix tab order for message drawer 2020-04-20 11:37:34 +02:00
Andrew Nicols
56bcfae31f MDL-66607 message: Add pendingJS checks 2020-03-11 16:23:16 +08:00
Andrew Nicols
efeaa51edc MDL-66607 message: Resolve race conditions in message deletion process
This commit makes several changes:
1) Explicitly stop polling for messages when a conversation is deleted;
2) Check for deleted conversations when displaying new messages;
3) Do not add a new empty conversation; and
4) Introduce pendingJS checks to ensure that Behat waits for messags to finish rendering.
2020-03-11 16:23:16 +08:00
Jun Pataleta
fb31e3da0b MDL-67862 message: Render dialogue header only when necessary 2020-02-10 13:08:31 +08:00
Jake Dallimore
4e80934653 MDL-67637 core_message: only preview lastmessage text if safe to do so
If any html/script tags are found in the text() value, don't display it.
2020-01-08 12:31:09 +01:00
Jun Pataleta
b6fcec009e Merge branch 'MDL-65896-master' of https://github.com/ryanwyllie/moodle 2019-10-23 11:13:27 +08:00
Ryan Wyllie
4060fcc662 MDL-65896 admin: add admin setting to show emoji picker
Added an admin setting to show/hide the emoji picker in messaging
because some versions of MySQL don't have full unicode support so
emojis won't save in the dabase.

If we detect that the site is running an unsupported version of MySQL
then the setting can not be enabled. Instead the admin will see a
message explaining that they will need to upgrade their database
before they can enable the emoji picker.
2019-10-23 10:59:59 +08:00
Ryan Wyllie
9f536ec696 MDL-65896 message: add emoji auto complete to message app 2019-10-23 10:59:59 +08:00
Ryan Wyllie
8f80d18766 MDL-65896 message: add emoji picker to message app 2019-10-23 10:59:58 +08:00
Jake Dallimore
3f7382aa73 MDL-66912 core_message: improve media matching js for content previews
Rather than matching 'src' string, use a dummy node and check for a src
attribute.
2019-10-15 14:37:51 +08:00
Jun Pataleta
c2e4e6d588 Merge branch 'MDL-66226-master-2' of https://github.com/snake/moodle 2019-10-15 11:56:05 +08:00
Michael Hawkins
fb599f32d6 MDL-66076 message: Add copy of template plus JS comment fix 2019-10-11 11:09:50 +08:00
Shamim Rezaie
8ffe06b9aa MDL-66298 javascript: Introduced new core AMD for sending bulk messages
Part of MDL-66076.
2019-10-11 11:09:50 +08:00
Ryan Wyllie
7754fa54d6 MDL-66226 core_message: convert formatMessagePreview to async function
Uses the nicer syntax of sync/await, removing some of the promises
clutter.
2019-10-04 16:50:30 +08:00
Jake Dallimore
c11baac4b4 MDL-66226 core_message: wrap promise chains in pending for behat
Fixes random failures by forcing behat to wait for the pane to render.
2019-10-04 14:37:25 +08:00
Jake Dallimore
545e8988c3 MDL-66226 core_message: don't display html as text in overview section
Instead of displaying the source code, as text, display a content
indicator which tells the user what sort of content the message might
contain.
2019-10-04 14:34:19 +08:00
Ryan Wyllie
6d9c93560b MDL-66477 core: remove snakeCase block regions from drawer.mustache 2019-09-27 15:46:15 +08:00
Jun Pataleta
8aca1807ae MDL-66477 message: Use the generic drawer for the message drawer 2019-09-27 15:38:54 +08:00
Andrew Nicols
11970d0a7f MDL-65493 message: JS fixes for random behat fails 2019-09-06 08:40:56 +08:00
Adrian Greeve
9f236d63e6 Merge branch 'MDL-65093_master-deprecate' of git://github.com/markn86/moodle 2019-07-29 10:43:52 +08:00
Mark Nelson
386634bab3 MDL-65093 core_message: show 'OK' dialogue 2019-07-29 10:39:57 +08:00