Themes

jQuery for theme bootstrap ?

 
Picture of Bas Brands
jQuery for theme bootstrap ?
Core developersPlugin developersTesters

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)
Gareth J Barnard
Re: jQuery for theme bootstrap ?
Core developersParticularly helpful MoodlersPlugin 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)
Picture of DPaW Web
Re: jQuery for theme bootstrap ?
 

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.



 
Average of ratings: -
Me!
Re: jQuery for theme bootstrap ?
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters
Just noting that for 2.9 I reverted to the JQuery version of the bootstrap 2 JS libraries.

 
Average of ratings: Useful (1)
It's only an avatar...
Re: jQuery for theme bootstrap ?
Core developersDocumentation writersParticularly helpful MoodlersPlugin developersTesters

 
Average of ratings: -
Gareth J Barnard
Re: jQuery for theme bootstrap ?
Core developersParticularly helpful MoodlersPlugin 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)
Picture of Richard Oelmann
Re: jQuery for theme bootstrap ?
Core developersParticularly helpful MoodlersPlugin developersTesters

Flexibase - Bootstrap 3.x

 
Average of ratings: Useful (1)
It's only an avatar...
Re: jQuery for theme bootstrap ?
Core developersDocumentation writersParticularly helpful MoodlersPlugin developersTesters

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.

 
Average of ratings: -
Gareth J Barnard
Re: jQuery for theme bootstrap ?
Core developersParticularly helpful MoodlersPlugin developers

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

And 'Shoehorn' is now standalone.

 
Average of ratings: -