Vibrant Ice
Vibrant Ice

Reputation: 81

in SpringSource Tool Suite, where can I edit the themes?

I've been asked to theme a site for a team (just a few hours they said), but they're using Grails with SpringSource tool Suite. I'm not familiar with either.

When I look at the "proper" source, the theme source files don't exist, yet they get served. If I search for the files in the IDE, I get some stuff in .path_to_grails_plugin directory (which is not in source control). If I edit THERE, it picks up my changes, but that doesn't help the team... and I want to point to a NEW theme, not mess up the original one. The Target directory has some of the files, but not all, but isn't that where generated content goes? So where is the REAL source? This feels like the dark arts to me. I am clearly missing some fundamental knowledge about how this works.

I want to add a custom theme (theme-roller-generated), so I created a sub-folder for it in my web-app folder. Then, in my config.groovy file I put:

grails.resources.modules = {
    core {
        dependsOn 'jquery-ui'
    }
    // Define reference to custom jQuery UI theme
    overrides {
        'jquery-theme' {
             resource id: 'theme', url: '/css/theme-redo/jquery-ui-1.8.19.custom.css'
        }
    }
}

That doesn't do anything. It still serves the old css. Help me find the light!

Upvotes: 1

Views: 958

Answers (2)

bensfromoz
bensfromoz

Reputation: 11

I've been running into the same problem. My workaround is to create another Resource module and include the theme there. It's an imperfect solution as the original unwanted theme css is still included - but it works.

ApplicationResources.groovy contains:

modules = {
    application {
        resource url:'js/application.js'
        resource url:'/css/smoothness/jquery-ui-1.8.20.custom.css'
    }
}

my.gsp contains:

<r:require modules="jquery, jquery-ui, application" /> 

ordering may be important..

Upvotes: 0

Michael J. Lee
Michael J. Lee

Reputation: 12396

The CSS is stored in the web-app\css and the JavaScript is in the web-app\js directories. However, I high recommend going through some tutorials before moving stuff around by trial and error. Good luck!

Upvotes: 1

Related Questions