1. #1
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    8
    Vote Rating
    0
    jholloway7 is on a distinguished road

      0  

    Default Relative paths to Neptune overrides in bootstrap.js

    Relative paths to Neptune overrides in bootstrap.js


    When I do a build/refresh, the following lines are put at the bottom of bootstrap.js.

    Code:
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/Component.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/container/ButtonGroup.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/panel/Panel.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/layout/component/Dock.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/toolbar/Toolbar.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/form/field/HtmlEditor.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/grid/RowEditor.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/menu/Menu.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/menu/Separator.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/panel/Table.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/panel/Tool.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/picker/Month.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/resizer/Splitter.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/tab/Tab.js");
    Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/toolbar/Paging.js");
    These seem to be necessary to get the Neptune theme to line things up correctly (see also bug # 3.1.0.130).

    There seems to be an assumption made here that isn't holding true in my development environment because the URLs being generated aren't the 'base' URLs for my application.

    Am I missing a configuration or classpath setting that lets me configure the base URL for these overrides?

    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    When you do a build these should all be built into the compiled js file.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    8
    Vote Rating
    0
    jholloway7 is on a distinguished road

      0  

    Default


    If I open 'all-classes.js' after a clean build, I see that it contains code for creating the ExtThemeNeptune namespaces, but the classes aren't actually in there.

    In development mode, it seems to be relying on the above code in bootstrap.js to load those overrides, but like I mentioned loadScript gets a 404 because the relative URLs it's using don't line up with how I'm serving up the rest of my ExtJS app.

    I hope I'm making sense. I'm having difficulty figuring out how all the pieces fit together for this new theming subsystem otherwise I might be able to discuss it/troubleshoot it more intelligently.

    Quote Originally Posted by mitchellsimoens View Post
    When you do a build these should all be built into the compiled js file.

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    13
    Vote Rating
    4
    thefugal is on a distinguished road

      0  

    Default


    Did you ever find a solution to this? I'm having the same problem loading the uncompressed source files in development mode.

  5. #5
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    8
    Vote Rating
    0
    jholloway7 is on a distinguished road

      0  

    Default


    I hacked around it doing the following:

    First, add the ext-theme-neptune overrides to your classpath in .sencha/app/sencha.cfg. From what I gather, these classes override/monkeypatch some of the base components to make them play nicely with the theme.

    Code:
    app.classpath=[snip]${app.dir}/packages/ext-theme-neptune/overrides
    Next, set the loader path for the ExtThemeNeptune overrides somewhere before your viewport gets loaded:

    Code:
    Ext.Loader.setPath 'ExtThemeNeptune', "[your static files url]/packages/ext-theme-neptune/overrides"
    Next, require all the override classes somewhere before your viewport gets loaded:

    Code:
        requires: [
    ...snip...
            'ExtThemeNeptune.*'
            'ExtThemeNeptune.container.*'
            'ExtThemeNeptune.panel.*'
            'ExtThemeNeptune.layout.*'
            'ExtThemeNeptune.toolbar.*'
            'ExtThemeNeptune.form.*'
            'ExtThemeNeptune.grid.*'
            'ExtThemeNeptune.menu.*'
            'ExtThemeNeptune.picker.*'
            'ExtThemeNeptune.resizer.*'
            'ExtThemeNeptune.tab.*'
        ]
    Finally, comment out the lines in bootstrap.js that try to explicitly load the overrides from the bogus location. You'll have to do this step every time you run 'sencha app refresh'. However, given the above steps, leaving these lines in there is benign, though you'll get annoying 404 errors obviously.

    Code:
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/Component.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/container/ButtonGroup.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/panel/Panel.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/layout/component/Dock.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/toolbar/Toolbar.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/form/field/HtmlEditor.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/grid/RowEditor.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/grid/column/RowNumberer.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/menu/Menu.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/menu/Separator.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/panel/Table.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/panel/Tool.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/picker/Month.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/resizer/Splitter.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/tab/Tab.js");
    //Ext.Loader.loadScript("packages/ext-theme-neptune/overrides/toolbar/Paging.js");
    Last edited by jholloway7; 3 Sep 2013 at 11:49 AM. Reason: typo

  6. #6
    Sencha User
    Join Date
    Sep 2011
    Posts
    13
    Vote Rating
    4
    thefugal is on a distinguished road

      0  

    Default


    Thanks for the response @jholloway7. I'm glad you were able to find a solution that worked for you.

    I arrived at a different solution. The manual step of editing bootstrap.js wasn't going to work for our process. I put together an ant target to automatically rewrite the paths in bootstrap.js after `sencha app refresh` is executed.

    (I put this in .sencha/app/plugin.xml)
    Code:
        <!--
        Package overrides are included in development mode in bootstrap.js.  Overwrite the paths so that the files
        are served from the correct location.
        -->
        <target name="-after-app-refresh">
            <echo>Rewriting ${args.metadatafile} to load package scripts from ./extjsapp/packages instead of ./packages</echo>
            <replaceregexp
                    file="${args.metadatafile}"
                    match="loadScript\(&quot;packages"
                    replace="loadScript\(&quot;extjsapp/packages"
                    flags="g" />
        </target>
    This will replace all instances of
    Code:
    Ext.Loader.loadScript("packages/...
    with
    Code:
    Ext.Loader.loadScript("extjsapp/packages/...
    ...which is the base URL that our application requires.

    That ant task should just work, without any changes to your classpath or requires, and without any `Ext.Loader.setPath` calls. No human intervention required.

    Hopefully this is helpful to anyone else who runs into this problem. It still seems like this is a common enough case that the Sencha Cmd should just natively support this by changing a sencha.cfg property though...
    Last edited by thefugal; 9 Aug 2013 at 10:12 AM. Reason: Forgot "g" flag for global regex replace

  7. #7
    Sencha User
    Join Date
    Apr 2010
    Posts
    75
    Vote Rating
    4
    HriBB is on a distinguished road

      0  

    Default


    Wow thanks for this one @thefugal! There are problems if you move ext folder outside of the app. I moved it to Symfony2/web/vendor and Neptune overrides failed to load. Sencha team please do something about this.

    Here's my plugin.xml which also fixes invalid Ext.Loaded.addClassPathMappings() and [WHITESPACE]Ext.Msg bug.

    Code:
    <target name="-after-app-refresh">
        <echo>Rewriting ${args.metadatafile} to load framework scripts from /vendor/ext</echo>
        <replaceregexp
            file="${args.metadatafile}"                
            match="../../../../../web/vendor"
            replace="/vendor"
            flags="g" />
        <replaceregexp
            file="${args.metadatafile}"                
            match=" Ext.Msg"
            replace="Ext.Msg"
            flags="g" />
    </target>

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