My grails application is using jquery-ui and twitter bootstrap plugin. I use the default application.js structure. Then I add the following line to include the jquery-ui and bootstrap.js :
...
//= require jquery
//= require jquery-ui
//= require bootstrap
...
The bootstrap.js in loaded properly, but the jquery-ui.js is not included.
I had to use the following settings (for these versions):
grails-app/conf/BuildConfig.groovy
compile ":asset-pipeline:1.9.9"
runtime ":jquery:1.11.1"
runtime ":jquery-ui:1.10.3"
grails-app/assets/javascripts/foobar.js
//= require jquery
//= require js/jquery-ui-1.10.3.custom
grails-app/assets/stylesheets/foobar.css
/*
*= require themes/ui-lightness/jquery-ui-1.10.3.custom
*/
Assuming that you are using the jquery-ui grails plugin, it is not included, because the current version has no directive file under grails-app/assets/jquery-ui
. Instead it uses the web-app
directory, to put the javascript files in the subfolder jquery-ui/js
as you see in the sources.
In order to get jquery-ui
working you have to put the following line in your directive file:
//= require jquery
//= require jquery-ui/js/jquery-ui-1.10.3.custom.min
//= require bootstrap
In bootstrap it works out of the box, because they use a directive file under grails-app/assets/javascript
as you see here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With