Reputation: 115
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.
Upvotes: 6
Views: 4862
Reputation: 25942
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
*/
Upvotes: 11
Reputation: 97
this line also worked for me :
//= require jquery-ui/js/jquery-ui-1.10.3.custom.min
Upvotes: 0
Reputation: 1615
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.
Upvotes: 8