Skip to content

Commit

Permalink
FRONT-3061: Inclusion of external js assets from bootstrap-ie11.
Browse files Browse the repository at this point in the history
  • Loading branch information
papegaill committed Sep 17, 2021
1 parent 2c58d81 commit f729f90
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 3 deletions.
5 changes: 5 additions & 0 deletions bcl-builder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ module.exports = {
to: path.resolve(outputFolder, "assets/css"),
options: { up: true },
},
{
from: [path.resolve(outputFolder, "resources/js/libraries/bootstrap-ie11/**")],
to: path.resolve(outputFolder, "assets/js"),
options: { up: true },
},
{
from: [path.resolve(outputFolder, "resources/js/libraries/extend/progress.js")],
to: path.resolve(outputFolder, "assets/js"),
Expand Down
4 changes: 2 additions & 2 deletions includes/page_attachments.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ function oe_bootstrap_theme_page_attachments_alter(array &$attachments) {
$theme_path = $base_url . '/' . $theme->getPath();
$theme_path_safe = Html::escape($theme_path);
$markup = '<link rel="stylesheet" href="' . $theme_path_safe . '/assets/css/bootstrap-ie11.css">'
. '<script src="https://cdn.jsdelivr.net/combine/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js,npm/ie11-custom-properties@4,npm/element-qsa-scope@1"></script>'
. '<script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js?features=default%2CNumber.parseInt%2CNumber.parseFloat%2CArray.prototype.find%2CArray.prototype.includes"></script>';
. '<script src="' . $theme_path_safe . '/assets/js/bootstrap-5.0.0-beta2-ie11.js"></script>'
. '<script src="' . $theme_path_safe . '/assets/js/polyfill-ie11.min.js"></script>';

// Bootstrap-ie11 inline JS which will load the CSS and JS just for IE users.
// https://github.com/coliff/bootstrap-ie11
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"devDependencies": {
"@openeuropa/bcl-builder": "0.7.0",
"@openeuropa/bcl-theme-default": "0.7.0",
"bootstrap-ie11": "5.0.2",
"bootstrap-ie11": "5.1.1",
"chokidar-cli": "^3.0.0",
"copyfiles": "2.4.1",
"cross-env": "7.0.3",
Expand Down

Large diffs are not rendered by default.

91 changes: 91 additions & 0 deletions resources/js/libraries/bootstrap-ie11/polyfill-ie11.min.js

Large diffs are not rendered by default.

0 comments on commit f729f90

Please sign in to comment.