Results 1 to 5 of 5

Thread: Change Dojo Css

  1. #1
    Join Date
    Apr 2010
    Location
    Bangalore, India
    Posts
    6

    Default Change Dojo Css

    If we create a project with roo it generates the UI with dojo decoration and all. How do we change the css of Dojo elements if we want as the css is not stored locally?

  2. #2
    Join Date
    Dec 2007
    Location
    Stockholm, Sweden
    Posts
    190

  3. #3
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Currently the Dojo distribution is served up out of the Spring JS dependency in Roo generated MVC applications. So replacing a CSS in that jar would be somewhat painful. However, if you create a your customized CSS under src/main/webapp/styles and into the same subdirectory which is found in the jar file it should take precedence over the resource delivered out of the jar.
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  4. #4
    Join Date
    Feb 2008
    Location
    NY, NY
    Posts
    12

    Default

    Greetings, I'd like to make modifications to dijit.css (to make my input boxes wider). I notice that dijit.css is in spring-js-2.1.1.RELEASE.jar\META-INF\dijit\themes\. So I saved an edited version of dijit.css into src/main/webapp/styles/META-INF/dijit/themes/. (Actually, I copied it straight into /tomcat 7.0/webapps/myApp/styles/META-INF/dijit/themes/dijit.css and cycled the Win7 service. But it doesn't work. Do I have the wrong directory? Thank you --glennd

  5. #5
    Join Date
    Feb 2008
    Location
    NY, NY
    Posts
    12

    Default Replace dijit.css

    To replace any of the Spring-JS-dependencies, copy the files you'd like to replace into the same path that you find in the JAR file.

    For example, if you look in spring-js-2.1.1.RELEASE.jar, the path to the dijit.css file is

    /META-INF/dijit/themes/dijit.css.

    So when the jar is loaded into memory, it's path is

    classpath:/META-INF/dijit/themes/dijit.css

    To replace the jar's copy with your own version of dijit.css, create the same directory structure under the src/main/resources directory:

    src/main/resources/META-INF/dijit/themes/

    and copy dijit.css into that file.

    Once packaged and deployed, your copy of dijit.css will have the same effective path as the file in the jar:

    classpath:/META-INF/dijit/themes/dijit.css

    As Stefan notes above, your copy will take precedence over the resource delivered out of the jar.

    HTH,

    glennd

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •