Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext JS Premium Member
    Join Date
    Feb 2010
    Location
    Vancouver, BC
    Posts
    194
    Vote Rating
    0
    rkim is on a distinguished road

      0  

    Default accordin rendering

    accordin rendering


    I am saving last open accordion tab into cookie, and expand when page load
    as below.

    The second accordion expands fine, but first item cannot be opened anymore. If you remove the expand code, accordion works fine.
    Is there any method that opens accordion item other than expand ? or is it a bug ?

    listeners:
    {
    "afterrender":function()
    {
    var activeItem = Ext.getCmp("accordion_2"); //the last expanded item
    if (activeItem)
    activeItem.expand();
    }
    }


    Code:
    Ext.onReady(function()
      {
    
    
        var myBorderPanel = Ext.create("Ext.container.Viewport",
          {
            layout: "border",
            margin:"0 0 0 0",
            defaults:{border:false,header:false,defaults:{border:false}},
            items: [
              {
                id:"westPanel",
                region: "west",
                collapsible: true,
                collapseMode : "mini",
                split: true,         // enable resizing
                layout:"fit",
                width:250,
                items:[
                  {
                    xtype:"panel",
                    layout:"accordion",
                    animate:false,
                    items:[
                       {
                          id:"accordion_1",
                          title:"accordion1"
                        },
                        {
                          id:"accordion_2",
                          title:"accordion2"
                        },
                        {
                          id:"accordion_3",
                          title:"accordion3"
                        }
                    ]
                   }],
                listeners:
                  {
                    "afterrender":function()
                      {
                        var activeItem = Ext.getCmp("accordion_2");  //the last expanded item
                        if (activeItem)
                          activeItem.expand();
                      }
                  }
              },
              {
                id:"centerPanel",
                region: "center",     // center region is required, no width/height specified
                margins: "0 5 0 0",
                layout:"border",
                autoScroll:false,
                items:[]
              }]
          });
    
    
      });

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


    Instead of doing an expand in the afterrender event, why not just set collapsed : false on the item you want expanded?
    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
    Ext JS Premium Member
    Join Date
    Feb 2010
    Location
    Vancouver, BC
    Posts
    194
    Vote Rating
    0
    rkim is on a distinguished road

      0  

    Default


    I have hardcoded accordion_2 to show you the bug, but value is actually from cookie
    activeItem = Ext.getCmp(Ext.util.Cookies.get("accordioncookie"));

    I don't know this is correct way or not.. but I changed it to below..
    and still doesn't work.

    activeItem.set("collapsed",false);
    activeItem.setConfig("collapsed",false);

Thread Participants: 1