1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    99
    Vote Rating
    0
    Perdiga is an unknown quantity at this point

      0  

    Default Problem with disclosure and delete button

    Problem with disclosure and delete button


    why disclosure and delete button does not work? in pr3 works fine

    Code:
    Ext.define('App.view.TocListItem', {
    	extend: 'Ext.dataview.component.DataItem',
    	xtype : 'toclistitem',
    
    
    	config: {	
            cls: 'x-list-item',	               
            layout: {
    			type: 'hbox',
    			align: 'middle'
    		},                       
    
    
            propertiesButton: {                                       			
                cls:'x-list-disclosure',                                     
                margin: '0 -12',                                                                                                                           
    		},
    
    
            deleteButton: {                                       
    			text: 'Apagar',			
                ui: 'decline-small',
    			hidden: false,
                margin: '0 11 0 -68 ', 
                height: 32,
                width: 72,
    		},        
            
    		items: [                        
    			{	                                           
    				tpl: [  
                        '<div class="toclist-item">',
                            '<img src="{icone}" class="toclist-item-img" alt="" />', 
                            '<tpl if="nome == ' + "'...'" + '">', 
                                '<div class="toclist-item-title-back">{nome}</div>',  
                                '<div class="toclist-item-description"></div>',                             
                            '</tpl>',    
                            '<tpl if="nome != ' + "'...'" + '">', 
                                '<div class="toclist-item-title">{nome}</div>',
                                '<div class="toclist-item-description">{data_modificacao}</div>',	
                            '</tpl>',                                              
                        '</div>',
                    ],
    				flex: 1,
    			},                       
    		],	                
    	},	    
           
        /**
    	 * Retorna uma instância de Ext.Button baseado na configuração do {@link #deleteButton}.
    	 */
    	applyDeleteButton: function(config) {                
            return Ext.factory(config, Ext.Button, this.getDeleteButton());
        },
    
    
        /**
         * Quando a configuração  do {@link #deleteButton} é atualizada, aplica ao item.
         */
        updateDeleteButton: function(newDeleteButton) {
            if (newDeleteButton) {
                this.add(newDeleteButton);
            }
        },
    
    
        /**
    	 * Retorna uma instância de Ext.Button baseado na configuração do {@link #propertiesButton}.
    	 */
    	applyPropertiesButton: function(config) {
            // não exibe quando o item for uma pasta "subir nível"
            if (this.getRecord().data.nome != '...') {
                return Ext.factory(config, Ext.Button, this.getPropertiesButton());                        
            }
        },
    
    
        /**
         * Quando a configuração  do {@link #propertiesButton} é atualizada, aplica ao item.
         */
        updatePropertiesButton: function(newPropertiesButton) {    
            if (newPropertiesButton) {
                this.add(newPropertiesButton);
            }
        },
    });

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

      0  

    Default


    Ext.Button is not a container so it will not accept an items configuration like you specified in the delete button.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

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