theme_boost/bs4-compat

Description:
  • Backward compatibility for Bootstrap 5.

    This module silently adapts the current page to Bootstrap 5. When the Boostrap 4 backward compatibility period ends in MDL-84465, this module will be removed.

Source:
Deprecated:
  • since Moodle 5.0
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
To Do:
  • Final deprecation in Moodle 6.0. See MDL-84465.

Backward compatibility for Bootstrap 5.

This module silently adapts the current page to Bootstrap 5. When the Boostrap 4 backward compatibility period ends in MDL-84465, this module will be removed.

Members

(static, constant) init

Description:
  • Init Bootstrap 4 compatibility.

Source:
Deprecated:
  • since Moodle 5.0

Init Bootstrap 4 compatibility.

(inner, constant) bootstrapElements

Description:
  • List of Bootstrap 4 elements to replace with Bootstrap 5 elements. This list is based on the Bootstrap 4 to 5 migration guide: https://getbootstrap.com/docs/5.0/migration/

    The list is not exhaustive and it will be updated as needed.

Source:

List of Bootstrap 4 elements to replace with Bootstrap 5 elements. This list is based on the Bootstrap 4 to 5 migration guide: https://getbootstrap.com/docs/5.0/migration/

The list is not exhaustive and it will be updated as needed.

Methods

(inner) initializeBootsrap4Components(container)

Description:
  • Ensure Bootstrap 4 components are initialized.

    Some elements (tooltip and popovers) needs to be initialized manually after adding the data attributes.

Source:
Parameters:
Name Type Description
container HTMLElement

The element to search for Bootstrap 4 elements.

(inner) replaceBootstrap4Attributes(container)

Description:
  • Replace Bootstrap 4 attributes with Bootstrap 5 attributes.

Source:
Parameters:
Name Type Description
container HTMLElement

The element to search for Bootstrap 4 elements.