From 15cd073a2f9be9046c3d7e2db2b0f0608a42806a Mon Sep 17 00:00:00 2001 From: David Woloszyn Date: Fri, 21 Jul 2023 15:19:21 +1000 Subject: [PATCH] MDL-74544 lib: Set Moodle files after JQuery UI upgrade --- lib/jquery/plugins.php | 4 ++-- lib/jquery/readme_moodle.txt | 24 +++++++++++++++--------- lib/requirejs/moodle-config.js | 2 +- lib/thirdpartylibs.xml | 2 +- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/lib/jquery/plugins.php b/lib/jquery/plugins.php index e1f8d0cd720..624c81a29e4 100644 --- a/lib/jquery/plugins.php +++ b/lib/jquery/plugins.php @@ -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')), ); diff --git a/lib/jquery/readme_moodle.txt b/lib/jquery/readme_moodle.txt index f2dd7eae310..17fd20b546e 100644 --- a/lib/jquery/readme_moodle.txt +++ b/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 +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/, - delete old files and 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/ run phpunit tests +4/ Update the version of jquery in core_privacy\local\request\moodle_content_writer::write_html_data() and privacy/templates/htmlpage.mustache. -5/ open http://127.0.0.1/lib/tests/other/jquerypage.php +5/ Run phpunit tests + +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 diff --git a/lib/requirejs/moodle-config.js b/lib/requirejs/moodle-config.js index ea468cd87c3..ce7da339253 100644 --- a/lib/requirejs/moodle-config.js +++ b/lib/requirejs/moodle-config.js @@ -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]' }, diff --git a/lib/thirdpartylibs.xml b/lib/thirdpartylibs.xml index 199c9be34cc..bd7d7db1a94 100644 --- a/lib/thirdpartylibs.xml +++ b/lib/thirdpartylibs.xml @@ -151,7 +151,7 @@ jquery jQuery UI MIT - 1.12.1 + 1.13.2