MDL-71704 lib: Set Moodle files after JQuery upgrade
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
$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')),
|
||||
'jquery' => array('files' => array('jquery-3.6.0.min.js')),
|
||||
'ui' => array('files' => array('ui-1.13.0/jquery-ui.min.js')),
|
||||
'ui-css' => array('files' => array('ui-1.13.0/theme/smoothness/jquery-ui.min.css')),
|
||||
);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,8 +6,8 @@ var require = {
|
||||
waitSeconds : 0,
|
||||
|
||||
paths: {
|
||||
jquery: '[JSURL]lib/jquery/jquery-3.5.1[JSMIN][JSEXT]',
|
||||
jqueryui: '[JSURL]lib/jquery/ui-1.12.1/jquery-ui[JSMIN][JSEXT]',
|
||||
jquery: '[JSURL]lib/jquery/jquery-3.6.0[JSMIN][JSEXT]',
|
||||
jqueryui: '[JSURL]lib/jquery/ui-1.13.0/jquery-ui[JSMIN][JSEXT]',
|
||||
jqueryprivate: '[JSURL]lib/requirejs/jquery-private[JSEXT]'
|
||||
},
|
||||
|
||||
|
||||
@@ -130,14 +130,14 @@
|
||||
<location>jquery</location>
|
||||
<name>jQuery</name>
|
||||
<license>MIT</license>
|
||||
<version>3.5.1</version>
|
||||
<version>3.6.0</version>
|
||||
<licenseversion></licenseversion>
|
||||
</library>
|
||||
<library>
|
||||
<location>jquery</location>
|
||||
<name>jQuery UI</name>
|
||||
<license>MIT</license>
|
||||
<version>1.12.1</version>
|
||||
<version>1.13.0</version>
|
||||
<licenseversion></licenseversion>
|
||||
</library>
|
||||
<library>
|
||||
|
||||
@@ -627,8 +627,8 @@ class moodle_content_writer implements content_writer {
|
||||
$targetpath = ['js', 'general.js'];
|
||||
$this->copy_data($jspath, $targetpath);
|
||||
|
||||
$jquery = ['lib', 'jquery', 'jquery-3.5.1.min.js'];
|
||||
$jquerydestination = ['js', 'jquery-3.5.1.min.js'];
|
||||
$jquery = ['lib', 'jquery', 'jquery-3.6.0.min.js'];
|
||||
$jquerydestination = ['js', 'jquery-3.6.0.min.js'];
|
||||
$this->copy_data($jquery, $jquerydestination);
|
||||
|
||||
$requirecurrentpath = ['lib', 'requirejs', 'require.min.js'];
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<div data-main-content class="jumbotron bg-light border">
|
||||
<h2 class="display-8">{{#str}}viewdata, core_privacy{{/str}}</h2>
|
||||
</div>
|
||||
<script src="js/jquery-3.5.1.min.js"></script>
|
||||
<script src="js/jquery-3.6.0.min.js"></script>
|
||||
<script src="js/data_index.js"></script>
|
||||
<script src="js/general.js"></script>
|
||||
<script src="js/require.min.js"></script>
|
||||
@@ -74,7 +74,7 @@
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"app": "./",
|
||||
"jquery": "./js/jquery-3.5.1.min",
|
||||
"jquery": "./js/jquery-3.6.0.min",
|
||||
"core/tree": "./js/tree.min"
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user