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
    Sencha User SlashEMc2k's Avatar
    Join Date
    Jul 2007
    Posts
    84
    Vote Rating
    0
    SlashEMc2k is on a distinguished road

      0  

    Question Cyclebutton stops working after I add a menu Item?

    Cyclebutton stops working after I add a menu Item?


    When I add menu Items to cycleButton it seems to break the cycle button and I cannot select the newly added buttons...

    I had a look here and tried to insert the extra params but it had no effect?
    http://www.sencha.com/forum/showthre...ht=cyclebutton

    What silly thing have I done to break it?


    Code:
    		var vTotalYear = vCurrentYear - 2009;
    		var vComponentName = ['btnFiscalYearFrom','btnFiscalYearTo'];
    		for (i=0;i<vComponentName.length;i++){
    			var vYearsToDisplay = [];
    			var component = Ext.getCmp(vComponentName[i]);
    			
    			for (x = 0;x<=vTotalYear;x++) {
    				var vYear = 2009 + x;
    				var vYearVal;
    				
    				
    				if (vYear == vCurrentYear) {
    					vYearVal = {
    						id:'active_'+vComponentName,
    						text:vYear,
    						xtype:'menuitem',
    				       		checked:true
    					};
    				} else {
    					vYearVal = {
    						text:vYear,
    						xtype:'menuitem'
    					};
    				}
    				vYearsToDisplay[x]=vYearVal;
    			}
    			component.menu.add(vYearsToDisplay);
    			component.setActiveItem('active_'+vComponentName);
    		}

  2. #2
    Sencha User SlashEMc2k's Avatar
    Join Date
    Jul 2007
    Posts
    84
    Vote Rating
    0
    SlashEMc2k is on a distinguished road

      0  

    Default


    ok fixed the menu so it's selectable updating -
    xtype: 'menucheckitem',

    Code:
    xtype: 'menucheckitem',
    checkHandler: component.checkHandler,
    group: 'land',
    itemIndex: component.itemCount + (x+1),
    scope: component
    But cycles still not working
    But the drop down menu when you select an item is now selected and visible.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    9
    Vote Rating
    0
    Jibbercan is on a distinguished road

      0  

    Default This is working for me in 4.1.2 if....

    This is working for me in 4.1.2 if....


    Hi there,

    You code helped me out. I found two ways to solve this problem.

    1. I found that if the cycle button is initially configured with a menu and at least one menucheckitem it wires everything up correctly. Then in my code I use the cloneConfig({text: 'my new item'); to create a new item which becomes a member of the same radio group when I call the menu.add(). Of course I'm removing the initially configured item.

    Code:
    var item = cycle.menu.items.items[0].cloneConfig({text: 'cloned item'});
    cycle.menu.add(item);
    2. If I follow your example but set the group: 'name of cycle button' then it works too. My guess is that the handler is using the group name to find the Cycle button above it to set the text, etc.

    Code:
    item = Ext.create('Ext.menu.CheckItem', {
        text: 'James Sutton', 
        checkHandler: cycle.checkHandler,
        checked: true,
        scope: cycle,
        group: 'currentUser'    
    });
    cycle.menu.add(item);

Thread Participants: 1