PDA

View Full Version : How to share a custom theme in a multi-page ExtJS application



ykey
11 Oct 2012, 6:54 AM
I am wondering the best way to go about sharing a custom theme and resources like images in a multi-page ExtJS application build. It seems like it currently requires you to rebuild the theme for each individual page in your application.

I would like to store the theme at the workspace level and be able to build the "app" (all pages) by issuing the `sencha app build` command from the workspace directory. Then each page would just reference the theme from the build root.

Something like this..



build\
build\resources\
build\resources\images
build\resources\css
build\page1\
...
build\page2
...

andyjl
12 Oct 2012, 1:40 PM
I am having this same problem as well.

ykey
15 Oct 2012, 6:50 AM
Bump. Don't want this to get buried until we hear some official response from a Sencha dev.

burnnat
15 Oct 2012, 12:12 PM
I'm also interested to hear what the "proper" way is, if one exists. The best I could do was hack together a not-too-great solution using the Ant integration of Sencha Cmd.

dongryphon
15 Oct 2012, 2:20 PM
Sorry for the delay. I promise I haven't been ignoring your question ...

At present, elbow grease is about the only answer (and leveraging Ant is a good choice there). You could create a "theme app" (an app with just one theme) to help isolate the theme from "real" apps.

We will be working on a more elegant answer for future releases.

ykey
16 Oct 2012, 4:09 PM
Thanks for replying Don. I have a work around for now but hope this makes it in.

dongryphon
26 Dec 2012, 5:02 PM
The migration is underway - 3.0.2 moves themes into a proper package structure and 3.1 *should* see that structure be shared in a workspace.

http://www.sencha.com/forum/showthread.php?252465-Changes-to-organization-of-Ext-JS-Themes-in-Cmd-3.0.2