Skip to content

Commit

Permalink
Bootstrap 4 dropdowns in front-end require two clicks to activate con…
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Bitter committed Aug 21, 2020
1 parent aec50c0 commit ff79adf
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion application/bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@
* );
*
* ----------------------------------------------------------------------------
*/
*/
9 changes: 0 additions & 9 deletions build/assets/cms.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
// Include core libraries for panels, etc...
import "@concretecms/bedrock/assets/cms/js/base";

// Import only the bootstrap libraries required for the CMS domain.
import "bootstrap/js/dist/tooltip";
import "bootstrap/js/dist/popover";
import "bootstrap/js/dist/tab";
import "bootstrap/js/dist/toast";
import "bootstrap/js/dist/modal";
import "bootstrap/js/dist/dropdown";
import "bootstrap/js/dist/collapse";
1 change: 1 addition & 0 deletions build/webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ mix.webpackConfig({
},
externals: {
jquery: 'jQuery',
bootstrap: true,
vue: 'Vue'
},
// Override the default js compile settings to replace exclude with something that doesn't exclude node_modules.
Expand Down
18 changes: 18 additions & 0 deletions concrete/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,17 @@
],
],

'bootstrap' => [
[
'javascript',
'js/bootstrap.js',
[
'position' => Asset::ASSET_POSITION_FOOTER,
'version' => '4.0.0'
]
]
],

// This is the base CKEditor library from CKEditor
'ckeditor' => [
[
Expand Down Expand Up @@ -528,6 +539,12 @@
],
],

'bootstrap' => [
[
['javascript', 'bootstrap']
],
],

'vue' => [
[
['javascript', 'vue'],
Expand Down Expand Up @@ -555,6 +572,7 @@
'core/cms' => [
[
['javascript', 'jquery'],
['javascript', 'bootstrap'],
['javascript', 'vue'],
['css', 'font-awesome'],
['javascript', 'core/cms'],
Expand Down
1 change: 1 addition & 0 deletions concrete/src/Page/Theme/BedrockThemeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public function registerAssets()
$this->requireAsset('font-awesome');
$this->requireAsset('jquery');
$this->requireAsset('vue');
$this->requireAsset('bootstrap');
}

public function getThemeGridFrameworkHandle(): string
Expand Down

0 comments on commit ff79adf

Please sign in to comment.