bootstrap javascript?

I can find the boostrap css, but I can seem to find boostrap js, is it shipped with 5.7 ? if so how can we require it in the edit dialog of a bloc ?

View Replies:
c5box replied on at Permalink Reply

i believe it is already activated by default in edit mode. have you tried watching the new videos?
it helped me a lot working on 5.7. it also has guides on managing assets.
i hope this helps you. good luck :)
goutnet replied on at Permalink Reply
Yes I did but only bootstrap CSS is started, the js part is not even present in the archive ...

Florian Delizy

Le vendredi 3 octobre 2014 à 12:50, concrete5 Community a écrit :
mesuva replied on at Permalink Reply
My impression looking the /concrete/config/app.php file and /concrete/js/bootstrap directory is that the Bootstraps javascript files are individually pulled in, as opposed to the complete set via a single bootstrap.js file. There are appear to be some of the common js component, but they're not all there.

So if you are needing one of the scripts included with c5, I believe you can make some calls in your block controller's add and edit functions like:

But if you're needing a bootstrap script that isn't included, I think you'll need to include it with your block/package.

Boostrap.js isn't very big, even when it's not compressed, so I would have thought it would have been easier to just include the whole thing, but I guess the individual scripts mean that things can be as lightweight as possible. ¯\_(ツ)_/¯
andrew replied on at Permalink Reply
Heh. We wanted to include them individually so that they could be referenced individually and then turned off individually if a theme includes them in its
Js files. If you enable asset caching on the cache page in the dashboard they should be combined and minified on the fly.
Korvin replied on at Permalink Reply
The bootstrap javascript files we have can be found here:

You can see their asset configuration here:

Best wishes,
goutnet replied on at Permalink Reply
Hum, checked it but could not find them all, for instance the tab script is missing.

Should I create a pull request?
andrew replied on at Permalink Reply
We don't include the tab script in the core because we don't use it. A third party theme is free to include it, however. That's the purpose of the asset registries in the page theme classes. For example, if your third party theme relies on bootstrap javascript we don't ship in the core, they can include the full bootstrap.js, and register in their theme class that the theme provides all the bootstrap assets. Then, the core won't include our own versions of bootstrap/popover.js, etc... because we know the theme has them.
FrankX replied on at Permalink Reply
Hi, can you give an actual example how to tell the core system that the theme already provides the entire Bootstrap JS library?
andrew replied on at Permalink Reply
Check out this documentation:

Specifically, search for the lines

$this->providesAsset('javascript', 'bootstrap/*');
    $this->providesAsset('css', 'bootstrap/*');