Skip to content

Commit

Permalink
MDL-74544 lib: Set Moodle files after JQuery UI upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
davewoloszyn authored and andrewnicols committed Aug 9, 2023
1 parent d1604d2 commit 3f435c0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
4 changes: 2 additions & 2 deletions lib/jquery/plugins.php
Expand Up @@ -37,6 +37,6 @@

$plugins = array(
'jquery' => array('files' => array('jquery-3.5.1.min.js')),
'ui' => array('files' => array('ui-1.12.1/jquery-ui.min.js')),
'ui-css' => array('files' => array('ui-1.12.1/theme/smoothness/jquery-ui.min.css')),
'ui' => array('files' => array('ui-1.13.2/jquery-ui.min.js')),
'ui-css' => array('files' => array('ui-1.13.2/theme/smoothness/jquery-ui.min.css')),
);
26 changes: 16 additions & 10 deletions lib/jquery/readme_moodle.txt
@@ -1,21 +1,27 @@
Description of import of various jQuery libraries into Moodle:

1/ download jQuery JS from http://jquery.com/download/,
delete old files and edit plugins.php and lib/requirejs/moodle-config.js

2/ download jQuery UI files from http://jqueryui.com/download/all/,
delete old files and edit plugins.php and lib/requirejs/moodle-config.js
1/ Download compressed and uncompressed jQuery JS from http://jquery.com/download/,
copy the new version of the jquery-X.Y.Z.js and jquery-X.Y.Z.min.js files
delete old files
edit plugins.php and lib/requirejs/moodle-config.js

2/ Download jQuery UI files from http://jqueryui.com/download/all/,
copy the folder ui-A.B.C, with the new version of the JQuery UI library
delete old files
edit plugins.php and lib/requirejs/moodle-config.js
delete unnecessary files: external folder, index.html, AUTHORS.txt, package.json

3/ download all UI themes and update smoothness theme
3/ Download all UI themes,
create the theme folder into ui-A.B.C
copy the smoothness theme

4/ Update the version of jquery in core_privacy\local\request\moodle_content_writer::write_html_data() and privacy/templates/htmlpage.mustache.

4/ run phpunit tests
5/ Run phpunit tests

5/ open http://127.0.0.1/lib/tests/other/jquerypage.php
6/ Open http://127.0.0.1/lib/tests/other/jquerypage.php

6/ Update the version of jquery in core_privacy\local\request\moodle_content_writer::write_html_data()

Petr Skoda

Note: jQuery.trim() function and :first pseudo-class are deprecated. We use String.prototype.trim() and .first()
in Moodle code instead. Please note that in third party libraries there are still usages of jQuery.trim
Expand Down
2 changes: 1 addition & 1 deletion lib/requirejs/moodle-config.js
Expand Up @@ -7,7 +7,7 @@ var require = {

paths: {
jquery: '[JSURL]lib/jquery/jquery-3.5.1[JSMIN][JSEXT]',
jqueryui: '[JSURL]lib/jquery/ui-1.12.1/jquery-ui[JSMIN][JSEXT]',
jqueryui: '[JSURL]lib/jquery/ui-1.13.2/jquery-ui[JSMIN][JSEXT]',
jqueryprivate: '[JSURL]lib/requirejs/jquery-private[JSEXT]'
},

Expand Down
2 changes: 1 addition & 1 deletion lib/thirdpartylibs.xml
Expand Up @@ -144,7 +144,7 @@
<location>jquery</location>
<name>jQuery UI</name>
<license>MIT</license>
<version>1.12.1</version>
<version>1.13.2</version>
<licenseversion></licenseversion>
</library>
<library>
Expand Down

0 comments on commit 3f435c0

Please sign in to comment.