jQuery for theme bootstrap ?

jQuery for theme bootstrap ?

by Bas Brands -
Number of replies: 8
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers

Hi all,

With Moodle 2.9 moving more towards jQuery I was wondering if it would be a good idea to add the upstream bootstrap JavaScript libraries to the bootstrap contrib theme for Moodle? *

Samples of what you can do using Bootstrap JavaScript can be found here:

http://getbootstrap.com/javascript/

I have added a github branch that includes the jquery libs for testing:

https://github.com/bmbrands/theme_bootstrap/tree/MOODLE_28_STABLE_WITH_JQUERY


Looking forward to reading your replies!


* For those how are interested here's a short history of the bootstrapbase / bootstrap theme:

As most of you know the bootstrapbase parent theme was derived from the contributed bootstrap theme found in the Moodle plugin database.
The contributed bootstrap theme  was created using the (twitter) bootstrap framework from http://getbootstrap.com.
One of the requirement for the theme to be adopted into Moodle core was not to have any jQuery libraries. At the time we were able to provide a YUI ported version of the bootstrap JavaScript files by Jay Shirley. They were incomplete but at least added some features.

Average of ratings: Useful (2)
In reply to Bas Brands

Re: jQuery for theme bootstrap ?

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Bas,

Good idea, but as Bootstrap has no official AMD version I was stumped for M2.9 (as the 'jquery' folder mechanism is effectively depreciated).  So, in the past week I experimented with Shoehorn and found an AMD port as the available grunt tasks did not work.  Anyway, long story short, please see: https://github.com/bmbrands/theme_bootstrap/pull/360 for a working AMD version of the theme.

Cheers,

Gareth

Average of ratings: Useful (1)
In reply to Bas Brands

Re: jQuery for theme bootstrap ?

by DPaW Web -

Nice Bas!


I have been struggling to get a proper Fully Bootstrapped Moodle version out for ages.

I use your Bootstrap Base, but we really need the javascript functionality (Modals, Accordians etc), and just can't get it to work.

I have a Child theme using your Bootstrap theme as a base, I downloaded the beta on github but still no joy.

there's a lot of frontend developers who are proficient at jQuery and use Bootstrap, so this could really speed up site development.



In reply to Bas Brands

Re: jQuery for theme bootstrap ?

by Damyon Wiese -
Just noting that for 2.9 I reverted to the JQuery version of the bootstrap 2 JS libraries.

Average of ratings: Useful (1)
In reply to Damyon Wiese

Re: jQuery for theme bootstrap ?

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

To avoid confusion, here is a quick table stating the version of Bootstrap against the Moodle theme from memory:

Theme Bootstrap version
Bootstrap 3.x
Bootstrapbase 2.3.2
Campus 2.3.2
Clean 2.3.2
Elegance 3.x
Essential 2.3.2
More 2.3.2
Shoehorn 3.x
Shoelace 2.3.2


Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: jQuery for theme bootstrap ?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Why should there be confusion?  Confusion about what? There can't be any confusion if you are installing Elegance or Shoehorn as Moodle will not let you install it without its dependancies, which is, in their case, BOOTSTRAP 3.0 theme.

In reply to Mary Evans

Re: jQuery for theme bootstrap ?

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Confucius say "thy who enhance thoust theme bring need of framework API knowledge".

And 'Shoehorn' is now standalone.