Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FRONT-3061: Inclusion of external js assets from bootstrap-ie11. #70

Open
wants to merge 1 commit into
base: 1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.