Moodle 2.5: bootstrap with jQuery vs YUI

Moodle 2.5: bootstrap with jQuery vs YUI

بواسطة - Tomasz Muras
عدد الردود: 4
صورة Core developers صورة Plugin developers صورة Plugins guardians صورة 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

متوسط التقييمات: -
رداً على Tomasz Muras

Re: Moodle 2.5: bootstrap with jQuery vs YUI

بواسطة - 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.
رداً على David Scotson

Re: Moodle 2.5: bootstrap with jQuery vs YUI

بواسطة - Tomasz Muras
صورة Core developers صورة Plugin developers صورة Plugins guardians صورة Translators

Hi David,

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

Tomek

رداً على Tomasz Muras

Re: Moodle 2.5: bootstrap with jQuery vs YUI

بواسطة - Gareth J Barnard
صورة Core developers صورة Particularly helpful Moodlers صورة Plugin developers

Dear Tomasz,

If your interested in using jQuery with themes, please see MDL-15727 and associated issues.  Along with the following forum posts:

https://moodle.org/mod/forum/discuss.php?d=226096

https://moodle.org/mod/forum/discuss.php?d=226034#p982003

Cheers,

Gareth

رداً على Tomasz Muras

Re: Moodle 2.5: bootstrap with jQuery vs YUI

بواسطة - 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.