Moodle 2.5: bootstrap with jQuery vs YUI

Moodle 2.5: bootstrap with jQuery vs YUI

by Tomasz Muras -
Number of replies: 4
Picture of Core developers Picture of Plugin developers Picture of Plugins guardians Picture of Translators

Hello!

In Moodle 2.5 we now have a boostrap theme. It has bootstrap jQuery libraries replaced with their YUI ports.

I would be interested in building on top of the bootstrap but with the original, jQuery libraries. The jQuery-based theme is the one for 2.4 in the plugins: https://moodle.org/plugins/view.php?plugin=theme_bootstrap .

Do you think it makes sense to keep two bootstrap themes, one based on jQuery and another on YUI? In other words: should I be able to use all bootstrap components and JS, if I build on top of Moodle's YUI-based theme (and add jQuery)?

cheers,
Tomek

Average of ratings: -
In reply to Tomasz Muras

Re: Moodle 2.5: bootstrap with jQuery vs YUI

by David Scotson -
I've not tried it yet but it should be possible. I think a future version of the theme you link to will have this as a theme setting, so it'll just be a matter of (un)ticking a checkbox.
In reply to David Scotson

Re: Moodle 2.5: bootstrap with jQuery vs YUI

by Tomasz Muras -
Picture of Core developers Picture of Plugin developers Picture of Plugins guardians Picture of Translators

Hi David,

Sorry - what will be a theme setting? Adding jQuery to YUI-powered "bootstrap" theme?

Tomek

In reply to Tomasz Muras

Re: Moodle 2.5: bootstrap with jQuery vs YUI

by David Scotson -
Yes. Swapping out the YUI Bootstrap javascript files and replacing them with JQuery + standard Bootstrap javascript files should be the only change necessary. All the HTML side is the exact same. So it can easily be a theme setting, or you can create a child theme that only uses JQuery (for Bootstrap stuff at least, all the core Moodle stuff still uses YUI).

I believe that Bas is currently looking at how to integrate JQuery Bootstrap in the official 2.5 way that Gareth mentions, but adding it to 2.4 shouldn't be a big deal either as he's done it before. Following what he does is probably the best way forward if you're interested in this.