Threaded View

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    7
    Vote Rating
    0
    honeyandbee is on a distinguished road

      0  

    Default Answered: How to get the name of every title from accordion

    Answered: How to get the name of every title from accordion


    Hi

    I am developing a module for attendance of the employee. I am using accordion which will sow the name of the year as their title. And in every accordion details I have put a grid which contains the name of the months. I can get the grid value in controller but can't get the name of the accordion header that's why I am not being able to show the desired result in grid. Can anyone please help me on this to get the heading of accordion title? My accordion details is given below :

    Code:
    Ext.define('Ext4Example.view.attendence.Timeperiod' ,{
        extend: 'Ext.form.Panel',
        alias : 'widget.timeperiod',
        id: 'timeperiod',
        region: 'west',
        border: false,
        width: 150,
        height:400,
        split: true,
        defaults: {
            // applied to each contained panel
            //bodyStyle: 'padding:15px'
        },
        layout: {
            // layout-specific configs go here
            type: 'accordion',
            titleCollapse: true,
            animate: true,
            activeOnTop: true
        },
        
        initComponent: function() {
            
            var today = new Date();
            var yyyy = today.getFullYear();
            
            this.items = [{
                title: 'Year '+yyyy,
                items: [{
                xtype: 'months'
                }]
                //html: 'Panel content!'
            },{
                title: 'Year '+(yyyy-1),
                items: [{
                xtype: 'months'
                }]
                //html: 'Panel content!'
            },{
                title: 'Year '+(yyyy-2),
                items: [{
                xtype: 'months'
                }]
                //html: 'Panel content!'
            },{
                title: 'Year '+(yyyy-3),
                items: [{
                xtype: 'months'
                }]
                //html: 'Panel content!'
            },{
                title: 'Year '+(yyyy-4),
                items: [{
                xtype: 'months'
                }]
                //html: 'Panel content!'
            }];
            
            this.callParent(arguments);
        }
    });

  2. You're over-nesting. The grid should be the accordion item:

    Code:
    Ext.define('Ext4Example.view.attendence.Timeperiod' ,{
        extend: 'Ext.form.Panel',
        alias : 'widget.timeperiod',
        id: 'timeperiod',
        region: 'west',
        border: false,
        width: 150,
        height:400,
        split: true,
        defaults: {
            // applied to each contained panel
            //bodyStyle: 'padding:15px'
        },
        layout: {
            // layout-specific configs go here
            type: 'accordion',
            titleCollapse: true,
            animate: true,
            activeOnTop: true
        },
        
        initComponent: function() {
            
            var today = new Date();
            var yyyy = today.getFullYear();
            
            this.items = [{
                title: 'Year '+yyyy,
                xtype: 'months'
            },{
                title: 'Year '+(yyyy-1),
                xtype: 'months'
                //html: 'Panel content!'
            },{
                title: 'Year '+(yyyy-2),
                items: [{
                xtype: 'months'
                }]
                //html: 'Panel content!'
            }];
            
            this.callParent(arguments);
        }
    });

Thread Participants: 1

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