From 2faf5e8e4842db257227da26fb017dfaf15d9711 Mon Sep 17 00:00:00 2001 From: Bas Brands Date: Mon, 20 Dec 2021 14:40:20 +0100 Subject: [PATCH] MDL-72737 theme_boost: update for section header styles --- admin/tests/behat/purge_caches.feature | 4 +- .../behat/activities_edit_completion.feature | 1 + .../behat/course_collapse_sections.feature | 2 +- lib/editor/atto/plugins/h5p/lib.php | 3 +- .../moodle-atto_h5p-button-debug.js | 36 ++++-- .../moodle-atto_h5p-button-min.js | 4 +- .../moodle-atto_h5p-button.js | 36 ++++-- .../plugins/h5p/yui/src/button/js/button.js | 36 ++++-- lib/editor/atto/plugins/media/lib.php | 1 + .../moodle-atto_media-button-debug.js | 46 +++++-- .../moodle-atto_media-button-min.js | 8 +- .../moodle-atto_media-button.js | 46 +++++-- .../plugins/media/yui/src/button/js/button.js | 46 +++++-- lib/form/amd/build/collapsesections.min.js | 2 + .../amd/build/collapsesections.min.js.map | 1 + lib/form/amd/src/collapsesections.js | 80 ++++++++++++ lib/form/header.php | 3 +- lib/form/templates/collapsesections.mustache | 36 ++++++ lib/form/templates/element-header.mustache | 59 +++++++++ .../moodle-form-shortforms-debug.js | 118 +----------------- .../moodle-form-shortforms-min.js | 2 +- .../moodle-form-shortforms.js | 118 +----------------- lib/form/yui/src/shortforms/js/shortforms.js | 118 +----------------- lib/formslib.php | 34 ++--- lib/tests/behat/behat_forms.php | 9 +- .../behat/wiki_activity_completion.feature | 1 + report/outline/tests/behat/filter.feature | 4 +- search/tests/behat/behat_search.php | 3 +- theme/boost/scss/moodle/core.scss | 13 -- theme/boost/scss/moodle/forms.scss | 44 ++++--- theme/boost/style/moodle.css | 44 +++---- theme/classic/style/moodle.css | 44 +++---- 32 files changed, 467 insertions(+), 535 deletions(-) create mode 100644 lib/form/amd/build/collapsesections.min.js create mode 100644 lib/form/amd/build/collapsesections.min.js.map create mode 100644 lib/form/amd/src/collapsesections.js create mode 100644 lib/form/templates/collapsesections.mustache create mode 100644 lib/form/templates/element-header.mustache diff --git a/admin/tests/behat/purge_caches.feature b/admin/tests/behat/purge_caches.feature index 7f1e80560c444..15d522bb4cdbc 100644 --- a/admin/tests/behat/purge_caches.feature +++ b/admin/tests/behat/purge_caches.feature @@ -16,12 +16,12 @@ Feature: Purge caches Scenario: Purge selected caches Given I should not see "Selected caches were purged" When I set the field "Themes" to "1" - And I press "Purge selected caches" + And I click on "Purge selected caches" "button" in the "#fitem_id_purgeselectedcaches" "css_element" Then I should see "The selected caches were purged" Scenario: Purge selected caches without selecting any caches Given I should not see "Select one or more caches to purge" - When I press "Purge selected caches" + And I click on "Purge selected caches" "button" in the "#fitem_id_purgeselectedcaches" "css_element" Then I should not see "The selected caches were purged" And I should see "Select one or more caches to purge" diff --git a/course/tests/behat/activities_edit_completion.feature b/course/tests/behat/activities_edit_completion.feature index c601abf9768ff..993c68df477f8 100644 --- a/course/tests/behat/activities_edit_completion.feature +++ b/course/tests/behat/activities_edit_completion.feature @@ -30,6 +30,7 @@ Feature: Edit completion settings of an activity When I am on the TestPage "Page Activity editing" page And I expand all fieldsets And I press "Unlock completion options" + And I expand all fieldsets Then I should see "Completion options unlocked" And I set the field "Completion tracking" to "Students can manually mark the activity as completed" And I press "Save and display" diff --git a/course/tests/behat/course_collapse_sections.feature b/course/tests/behat/course_collapse_sections.feature index 96ac0f5980e75..ec81055a5210b 100644 --- a/course/tests/behat/course_collapse_sections.feature +++ b/course/tests/behat/course_collapse_sections.feature @@ -172,8 +172,8 @@ Feature: Collapse course sections When I navigate to "Settings" in current page administration And I expand all fieldsets And I set the following fields to these values: - | Format | Weekly format | | Course layout | Show one section per page | + | Format | Weekly format | And I press "Save and display" And "[data-toggle=collapse]" "css_element" should not exist in the "region-main" "region" And I click on "8 May - 14 May" "link" in the "region-main" "region" diff --git a/lib/editor/atto/plugins/h5p/lib.php b/lib/editor/atto/plugins/h5p/lib.php index 5aa345781e728..6b9da45f32428 100644 --- a/lib/editor/atto/plugins/h5p/lib.php +++ b/lib/editor/atto/plugins/h5p/lib.php @@ -80,7 +80,6 @@ function atto_h5p_strings_for_js() { ); $PAGE->requires->strings_for_js($strings, 'atto_h5p'); + $PAGE->requires->strings_for_js(['expand', 'collapse'], 'moodle'); $PAGE->requires->js(autoloader::get_h5p_core_library_url('js/h5p-resizer.js')); } - - diff --git a/lib/editor/atto/plugins/h5p/yui/build/moodle-atto_h5p-button/moodle-atto_h5p-button-debug.js b/lib/editor/atto/plugins/h5p/yui/build/moodle-atto_h5p-button/moodle-atto_h5p-button-debug.js index 98d1d42fbace4..9e892bc5abec6 100644 --- a/lib/editor/atto/plugins/h5p/yui/build/moodle-atto_h5p-button/moodle-atto_h5p-button-debug.js +++ b/lib/editor/atto/plugins/h5p/yui/build/moodle-atto_h5p-button/moodle-atto_h5p-button-debug.js @@ -93,9 +93,29 @@ var CSS = { '{{/if}}' + '' + '{{#if canUpload}}' + - '
' + - '{{get_string "h5poptions" component}}' + - '