Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-84324

Add jQuery compatibility for Bootstrap 5

XMLWordPrintable

    • MOODLE_500_STABLE
    • MOODLE_500_STABLE
    • MDL-84324-main
    • Hide

      Setup

      1. Download attached testing patch: MDL-84324-test.patch
        1. Apply the patch

          git apply MDL-84324-test.patch
          cd theme/boost
          grunt amd

      2. Purge caches

      Test

      1. Login as administrator
      2. Go to the Dashboard
      3. Confirm that the user menu is automatically opened
      4. Open the browser console
      5. Confirm "I am an event from jQuery!" message is displayed in the console

      Additional test (for key listener)

      1. Add a couple of course cateogories
      2. Go to the report builder (user menu -> Reports)
      3. Add a new report with report source "course" with include default setup. Then close the setup but the top button.
      4. View the report (in the report dropdown menu), open the filters panel and in the "search" open the dropdown with the triangle icon.
      5. Press Esc
      6. Ensure that when we press the Esc key, just the category search dropdown filter is closed and not the whole filter menu

      Show
      Setup Download attached testing patch: MDL-84324-test.patch Apply the patch git apply MDL-84324- test .patch cd theme /boost grunt amd 2. Purge caches Test Login as administrator Go to the Dashboard Confirm that the user menu is automatically opened Open the browser console Confirm "I am an event from jQuery!" message is displayed in the console Additional test (for key listener) Add a couple of course cateogories Go to the report builder (user menu -> Reports) Add a new report with report source "course" with include default setup. Then close the setup but the top button. View the report (in the report dropdown menu), open the filters panel and in the "search" open the dropdown with the triangle icon. Press Esc Ensure that when we press the Esc key, just the category search dropdown filter is closed and not the whole filter menu
    • Hide

      Code verified against automated checks.

      Checked MDL-84324 using repository: https://github.com/roland04/moodle.git

      More information about this report

      Built on: Fri Feb 21 01:55:17 PM UTC 2025

      Show
      Code verified against automated checks. Checked MDL-84324 using repository: https://github.com/roland04/moodle.git main (0 errors / 0 warnings) [branch: MDL-84324-main | CI Job ] More information about this report Built on: Fri Feb 21 01:55:17 PM UTC 2025
    • Show
      Launching automatic jobs for branch MDL-84324 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18343/ PHPUnit (sqlsrv / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62750/ Behat (NonJS - boost and classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62751/ Behat (Firefox - boost / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62752/ Behat (Firefox - classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62753/ App tests (stable app version) / complete) Built on: Mon Feb 24 04:19:43 PM UTC 2025
    • 3
    • HQ 2025 Sprint I1.1 Moppies

      Bootstrap 5 doesn't need jQuery anymore, but it is possible to add it for backward compatibility

      https://getbootstrap.com/docs/5.3/getting-started/javascript/#optionally-using-jquery

      You don't need jQuery in Bootstrap 5, but it's still possible to use our components with jQuery. If Bootstrap detects jQuery in the window object, it'll add all of our components in jQuery's plugin system.

      To remove this compatibility in the future, this patch can be reverted, or just add "data-bs-no-jquery" data attribute to the body so Bootstrap will prevent using jQuery. Source: https://getbootstrap.com/docs/5.3/getting-started/javascript/#jquery-events

        1. MDL-84324-test.patch
          0.9 kB
        2. screenshot-1.png
          screenshot-1.png
          38 kB
        3. MDL-84324 key listener.png
          MDL-84324 key listener.png
          247 kB
        4. MDL-84324.png
          MDL-84324.png
          240 kB

            mikelmartíncorrales Mikel Martín Corrales
            mikelmartíncorrales Mikel Martín Corrales
            Laurent David Laurent David
            Ferran Recio Ferran Recio
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 4 hours, 24 minutes
                3d 4h 24m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.