I've been coding in grails now for a couple months. They get added to the page through the main.gsp file with the following:
<g:javascript library="jquery"/>
<r:require module="jquery-ui"/>
The jquery and jquery-ui plugins have been working fine for dialogs, sorting, etc, but I want to add the tabs widget to my pages now and the versions of jquery and jquery-ui that come with the plugins framework don't seem to work with them. When I add the sources directly to a page:
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
everything works fine. So now I'm thinking of dumping the plugins entirely and just adding the libs in manually.
What is the best way to go about doing this? I could put them in the /js directory and modify ApplicationResources.groovy to reference them, but a co-worker mentioned he preferred adding them to the grails.resources.modules section of Config.groovy. I would like to know what the best way to accomplish this would be.
I also have the following in Config.groovy:
grails.resources.modules = {
overrides {
'jquery-theme' {
resource id: 'theme', url: '/css/smoothness/jquery-ui-1.10.0.custom.css'
}
}
Do I need to move this somewhere else or change it if I remove the plugins and manage the libs myself?