1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    32
    Answers
    3
    Vote Rating
    1
    AlexLans is on a distinguished road

      0  

    Question Answered: Docking issues with panels

    Answered: Docking issues with panels


    Hello,

    I've made this code, but I can't get the bottom panel to show. I'm working at it now for a few days, but I can't figure it out.

    Code:
    Ext.setup({
        tabletStartupScreen: 'images/Norma/MI-logo-transparant.png',
        phoneStartupScreen: 'images/Norma/MI-logo-transparant.png',
        icon: 'images/Norma/Norma.png',
        glossOnIcon: false,
        name: 'normamobile',
    
        onReady: function () {
            var app = this;
    
            // construct UI
            var viewport = Ext.create('Ext.Panel', {
                fullscreen: true,
                layout: 'fit',
                showingPage: false,
                showingSplash: true
            });
    
            // the toolbar across the top of the app, containing the buttons
            var topBar = Ext.create('Ext.TitleBar', {
                ui: 'dark',
                height: 92,
                docked: 'top',
                title: 'Norma Mobile'
            });
    
            // creates the top banner with patient info
            var topbarPanel = Ext.create('Ext.Panel', {
                height: 92,
                docked: 'top',
                items: [topBar]
            });
    
            var bottomBar = Ext.create('Ext.TitleBar', {
                ui: 'dark',
                height: 46,
                docked: 'bottom',
                title: 'Bottom Bar'
            });
    
            var bottomPanel = Ext.create('Ext.Panel', {
                docked: 'bottom',
                height: 46,
                items: [bottomBar]
            });
    
            // the page that displays each chapter and holds the carousel
            var page = Ext.create('Ext.Panel', {
                cls: 'page',
                ui: 'dark',
                layout: {
                    type: 'fit'
                },
                items: [topbarPanel, bottomPanel]
            });
    
            //stitch the UI together and create an entry page
            viewport.add(page);
         }
    });
    Thank you.

  2. It looks like your over nesting may be valid, if this is only the basics of your UI (which I assume it is).

    Anyhow, it looks like you are not including a DOCTYPE in your index.html file. Simply add the following code at the top of index.html:

    Code:
    <!doctype html>
    And it'll work.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Answers
    3542
    Vote Rating
    846
    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


    Just looking at your code and it seems you are overnesting and not using layouts on some classes that you should be. You can check the DOM to see if something is rendered but has heigh tof 0px to confirm that you need to use a layout or set a height. height will not always just work.
    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.

  4. #3
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Answers
    102
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Please look at how types are used in the framework. They will ultimately help you reduce code weight.

  5. #4
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    It looks like your over nesting may be valid, if this is only the basics of your UI (which I assume it is).

    Anyhow, it looks like you are not including a DOCTYPE in your index.html file. Simply add the following code at the top of index.html:

    Code:
    <!doctype html>
    And it'll work.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  6. #5
    Sencha User
    Join Date
    Dec 2011
    Posts
    32
    Answers
    3
    Vote Rating
    1
    AlexLans is on a distinguished road

      0  

    Thumbs up


    @ rdougan, indeed I misted the 'html' part sorry for bothering you guys.
    Thank you for all the help.