Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    81
    Vote Rating
    5
    mpost is on a distinguished road

      0  

    Default Using items config in panel header places items before title

    Using items config in panel header places items before title


    REQUIRED INFORMATIONExt version tested:
    • Ext 4.1.1
    • Ext 4.1.1 rev a
    Browser versions tested against:
    • Safari 6.0.1
    • Chrome 22.0.1229.94
    DOCTYPE tested against:
    • HTML5
    Description:
    • Using a header config in a panel, I want to insert additional items into the header. However, items are always inserted before the title element.
    • Due to this other bug, it is not possible to omit the title config and create it as a member of the items collection.
    Steps to reproduce the problem:
    • Create a panel.
    • Give it a header config.
    • In the header config, add a container to the items collection.
    The result that was expected:
    • Items in the items config appear after the title.
    The result that occurs instead:
    • Items appeared before the title.
    Test Case:
    PHP Code:
    Ext.create('Ext.Panel', {
        
    title'Example',
        
    width300,
        
    height400,
        
    renderToExt.getBody(),
        
    layout'border',
        
    defaults: {
            
    height100,
            
    width300
        
    },
        
    items: [
            {
            
    xtype'panel',
            
    region'center',
            
    title'panel 1',
            
    html'panel 1',
            
    collapsibletrue,
            
    header: {
                
    defaults: {
                    
    border1,
                    
    style: {
                        
    borderColor'red',
                        
    borderStyle'solid'
                    
    }
                },
                
    items: [
                    {
                    
    xtype'container',
                    
    html'<p style="text-align:center">centered text</p>',
                    
    flex1}
                ]
            }}
        ]
    });
    ​ 

    HELPFUL INFORMATION
    See this URL for live test case:
    http://jsfiddle.net/k2puA/1/

    Debugging already done:
    • none
    Possible fix:
    • not provided
    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • OS X 10.8.2
    • Windows 7 Pro SP1
    Last edited by mpost; 3 Nov 2012 at 10:07 AM. Reason: fix code formatting

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,728
    Vote Rating
    752
    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


    I wouldn't really say this is a bug. You are requesting the behavior to change. I find it that I always want to insert items before the title personally.
    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 User
    Join Date
    Sep 2012
    Posts
    81
    Vote Rating
    5
    mpost is on a distinguished road

      0  

    Default


    That would be a fair response if I could manually manage the title and make the header control do what I want. But due to the other issue I mentioned in the description, that's not possible due to the panel header always rendering an empty title with flex: 1.

    I could see wanting to add items prior to the title (such as an icon or perhaps a button), but you're screwed if you want to add them both before and after due to the other issue.
    Last edited by mpost; 3 Nov 2012 at 7:19 PM. Reason: add link

  4. #4
    Sencha User
    Join Date
    Sep 2012
    Posts
    81
    Vote Rating
    5
    mpost is on a distinguished road

      0  

    Default


    I guess another way to look at this bug is that there is no way to add items after the title when using the title config of Ext.panel.Header. So it's not necessarily that I'm requesting a behavior change -- I'm reporting that the header control is inflexible to the point that I consider a bug.

  5. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,124
    Vote Rating
    514
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    The answer is pretty much the same as here, so I'll just link to it for posterity: http://www.sencha.com/forum/showthre...l=1#post907472

    Once you override initComponent, you can insert() and remove() items as you please.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar