Quantcast

Setting the jQuery UI theme per resource module

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Setting the jQuery UI theme per resource module

pilaftank
Our website has regular user pages and management pages.  We would like to use one jQuery UI theme for the regular user pages ("site" module) and a different theme for the management pages ("admin" module).

We are on Grails 2.0.3 and our BuildConfig.groovy includes the plugins:
   compile ":cdn-resources:0.2.1"
   runtime ":jquery:1.7.1"
   runtime ":jquery-ui:1.8.15"
   runtime ":resources:1.2-RC1"

The documentation has instructions for overriding the default theme, but that appears to only apply to the whole application.

Overriding the Default Theme:
     http://grails.org/plugin/jquery-ui

So, I made a wild guess and inserted the "overrides" into each module, but it didn't stick per module.

File: grails-app/conf/ApplicationResources.groovy:
modules = {
   core {
      dependsOn 'jquery-ui'
      }
   site {
      dependsOn 'core'
      overrides {
         'jquery-theme' { resource id: 'theme', url: '/css/jqueryui/theme/dark-hive/jquery-ui-1.8.21.custom.css' }
         }
      }
   admin {
      dependsOn 'core'
      overrides {
         'jquery-theme' { resource id: 'theme', url: '/css/jqueryui/theme/smoothness/jquery-ui-1.8.21.custom.css' }
         }
      }
   }

Can jQuery UI themes be set at the module level?
Loading...