1. #1
    Ext User
    Join Date
    Apr 2007
    Posts
    11
    Vote Rating
    0
    J. Brisbin is on a distinguished road

      0  

    Default Including ext-all.css

    Including ext-all.css


    I'm just trying to figure out GXT because we already use Ext 1 and 2 and I'm trying to start using GWT (I'm fully ready to start migrating our apps from Ext 2 because of the sheer size of the download, which is killing our response times over a smallish WAN connection) and I've been following GXT since very nearly the beginning, though I'm only now starting to use it in a real-world application.

    I'm a little confused on why the ext-all.css file isn't included by either the main GXT module itself, or the Theme module. Is it really the case that, besides including an 'inheirit' in my module XML, I also need to include a stylesheet reference to "css/ext-all.css"? Or am I missing something?

    Following the Principle of Least Surprise, I tried doing a ThemeManager.register (like in the examples) to get the appropriate CSS and images (they're in the JAR file...) and when I tried to show a MessageBox, it threw a bunch of 404's in Firebug and there was no styling. I monkeyed around with it and found out that it copies the css and images I need into my module's generated source folder, which means I just added a stylesheet reference in my GWT module XML file and things work sort-of okay (Firefox now seems to have problems...which is a Bad Thing because we use a security-enhanced, embedded Firefox as our application browser...trying to figure out the cause of the cryptic JavaScript error).

    Along those same lines, is there any way I can tell the generators to SKIP copying the css and images folders? I'm going to have quite a number of modules that use GXT and I certainly don't want 2.5MB of duplicate images strewn throughout my SVN tree (GWT duplicates enough stuff as it is). I'll keep a single copy of the images folder as a peer to my module folders and include a stylesheet that imports the base Ext CSS from there.

    BTW- Is file size the reason GXT isn't using ImageBundles? Would the resulting bundle be too big? Or is there another reason?
    Thanks!

    Jon Brisbin
    Webmaster
    NPC International, Inc.

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    I'm a little confused on why the ext-all.css file isn't included by either the main GXT module itself, or the Theme module.
    Previously, the stylesheets were included in the module definition. However, there were a couple of problems with the approach.

    1. It forced users to have the stylesheets in the root directory of their module. As you mentioned in your post, many prefer to have a single location for styles and images, independent of the module. By removing the styles from the module, you are free to put the stylesheets and images anywhere you choose.

    2. When defining styles in the module xml it becomes more difficult to "override" styles. In order to override, the new styles must be loaded after the library styles which meant you must include your styles after your javascript include which usually occurs int the body element.

    You should only have to include ext-all.css in your html. The theme styles will be loaded on demand. Take a look at the explorer demo and you will see that it only includes ext-all.css. You must import the themes module if you use any custom themes (Slate).

    Along those same lines, is there any way I can tell the generators to SKIP copying the css and images folders?
    Not to my knowledge. However, you certainly do not need to deploy the styles and images with each module. You most likely want to deploy 1 copy to a single location referenced by all modules.

    ImageBundle support has been considered and may be added (it was planned for 1.0 but there are some issues that need investigation) at some time. It seems that the format is very rigid and would be difficult to support things like 3-state icons and themes. Many developers have asked for ImageBundle support, but I have yet to see anyone actually using them. If you are, I would love to hear from you.

  3. #3
    Ext User
    Join Date
    Jul 2008
    Posts
    202
    Vote Rating
    0
    eugenparaschiv is on a distinguished road

      0  

    Default


    I would have love to use ImageBundle in the app I'm creating right now. The point is I have many images in the app (the homepage alone has up to 30 individual images) so an ImageBundle would mean a single HTTP request instead of 30. It would be a great thing to have in GXT.
    Thanks.
    Eugen

  4. #4
    Ext GWT Premium Member
    Join Date
    Aug 2009
    Posts
    17
    Vote Rating
    0
    karansardana is on a distinguished road

      0  

    Default Can I do away with a part of gxt-all.css?

    Can I do away with a part of gxt-all.css?


    Hi,

    As everyone's already aware, gxt-all.css is too big a stylesheet, and causes a bit of a performance hit at times. In my application I'm not using all the styles; so, I'd like to get rid of a few styles which aren't getting used anywhere in my application.

    Is there any reliable way of doing that? Basically, my main objective is to make my application load quicker. Any other suggestions???

    Thanks,
    Karan

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi