Results 1 to 6 of 6

Thread: FiltersFeature styles do not work in prodution application

  1. #1
    Sencha User
    Join Date
    Nov 2009
    Location
    Aveiro, Portugal
    Posts
    47
    Answers
    3

    Default FiltersFeature styles do not work in prodution application

    Hi,

    I'm using Ext.ux.grid.FiltersFeature in a Ext 4.2 application.

    Using it outside my application, the CSS works as expected, using the CSS classes defined in GridFilters.css, as we can see in http://docs.sencha.com/extjs/4.2.0/extjs-build/examples/grid-filtering/grid-filter-local.html

    But in my application, the styles are never rendered properly. The class ux-filtered-column is injected as expected, by the styles are not applied, because there is a previous font property assigned to x-column-header.

    When I check the differences between my application and the mentioned example, the only difference is the order of ux-filtered-column and x-column-header. In my generated CSS, the x-column-header appears before ux-filtered-column.

    I did the following tests:
    * Put the GridFilters.css styles in sass/etc/all.scss

    Code:
    .ux-filtered-column {
      font-style: italic;
      font-weight: bold;
    }
    .ux-gridfilter-text-icon {
      background-image: url(images/find.png) !important;
    }
    * Put the style files in index.html before <!-- <x-compile> -->

    Code:
            <link rel="stylesheet" href="resources/css/GridFilters.css">
            <link rel="stylesheet" href="resources/css/RangeMenu.css">
    * Added !important to the rules.

    Nothing works. The headers never get rendered properly.

    Some help is appreciated. Thanks.

  2. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Hi--

    Which version of Ext JS 4.2 are you using? And do the styles work while you are in development, but not in production, or both (I couldn't quite tell from your comments).

    Thanks!
    Joel

  3. #3
    Sencha User
    Join Date
    Nov 2009
    Location
    Aveiro, Portugal
    Posts
    47
    Answers
    3

    Default

    Hi,

    I'm using ExtJs 4.2.1.883. I'm using sencha app build to generate the production version.

    I'm not able to use different index.html files for both the development version and the production version. The development index.html version is copied to the build folder.The application is available as open source at GitHub.

    I'm including the CSS both in the development and prodution version with:

    <!-- <x-compile> -->
    <!-- <x-bootstrap> -->
    <link rel="stylesheet" href="bootstrap.css">

    bootstrap.css contains one line with:

    @import 'build/production/GeoPublic/resources/GeoPublic-all.css';

    My custom CSS is written on sass/etc/all.scss. It only takes effect after building the application.

    So, I don't see the FiltersFeature CSS both in development and production mode, simply because I don't know how to deal with different CSS for development and production (my ignorance!). It would be nice not to build the application for every CSS change.

    On projects not generated by sencha command tool, the FiltersFeature CSS works (as in the provided examples).

    Thanks!

  4. #4
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Hi--

    Hmm, I'm not sure. I tried a fresh app with filters features (using Sencha Cmd), and it seems to work fine in both dev and production. Do you have a production version of the app that's publicly viewable?

    Thanks
    Joel

  5. #5
    Sencha User
    Join Date
    Nov 2009
    Location
    Aveiro, Portugal
    Posts
    47
    Answers
    3

    Default Problem solved

    Hi,

    To see the difference between the development and prodution versions, I've reverted manually the bootstrap.css file from:

    @import 'build/production/GeoPublic/resources/GeoPublic-all.css';
    to:

    @import 'ext/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css';

    Then, building the application again created a working css. I don't know exactly what happened, but the problem is solved.

    Thanks Joel for you feedback.

  6. #6
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Quote Originally Posted by jgrocha View Post
    Hi,

    To see the difference between the development and prodution versions, I've reverted manually the bootstrap.css file from:

    @import 'build/production/GeoPublic/resources/GeoPublic-all.css';
    to:

    @import 'ext/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css';

    Then, building the application again created a working css. I don't know exactly what happened, but the problem is solved.

    Thanks Joel for you feedback.
    Awesome, glad it's working!
    Joel

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
  •