1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    14
    Answers
    1
    Vote Rating
    0
    bugrasnmz is on a distinguished road

      0  

    Default Unanswered: SearchList example problem

    Unanswered: SearchList example problem


    Code:
    Ext.define('MyApp.view.MyPanel', {       extend: 'Ext.Panel',
        xtype:'mypanel',
        
        config: {
            ui: 'dark',
            weight:1024,
            height:800,
            layout: {
                type: 'card'
            },
            items: [
                {
                    xtype: 'titlebar',
                    docked: 'top',
                    title: 'Lezzet Dunyasi',
                    items: [
                        {
                            xtype: 'button',
                            docked: 'right',
                            height: 29,
                            hidden: true,
                            ui: 'back',
                            text: 'back'
                        }
                    ]
                },
                {
                    xtype: 'list',
                    docked: 'left',
                    id: 'mylist',
                    ui: 'round',
    
    
                            pinHeaders: false,
                             grouped: true,
                        disableSelection: true,
                    width: 331,
                    heigth: 2000,
                    itemTpl: [
                        '<img src="{img_url}" width="60" heigh="60"></img><span>{label}</span>'
                    ],
                   store: 'Menius',
    
    
                                 items: [
                                    {
                                        xtype: 'searchfield',
                                        docked: 'top',
                                        placeHolder: 'Arama...',
                                        autoCapitalize: true,
                                        label: 'Anahtar Kelime',
                                        labelWidth: '%60',
    
    
                                      listeners : {
                
                                                        scope: this,
                                            clearicontap: this.onSearchClearIconTap,
                                            keyup: this.onSearchKeyUp
                                                    }
                                        
                                        
                                    
    
    
                             
    
    
                                                              
                          
    
    
            
                                                                                }
                                                                            ]
                                                                        },
    
    
                                                                            onSearchKeyUp:function(field) {
                                                                                var value = field.getValue(),
                                                                                Menius = this.getStore();
                                                                                Menius.ClearFilter();
    
    
                                                                                if (value) {
    
    
                                                                                var searches = value.split(' '),
                                                                                                regexps = [],
                                                                                                i;
    
    
                                                                                for (i = 0; i < searches.length; i++) {
                                                                                            //if it is nothing, continue
                                                                                            if (!searches[i]) continue;
    
    
                                                                                            //if found, create a new regular expression which is case insenstive
                                                                                            regexps.push(new RegExp(searches[i], 'i'));
                                                                                        }
    
    
                                                                                        Menius.filter(function(record) {
                                                                                        var matched = [];
    
    
                                                                                        for (i = 0; i < regexps.length; i++) {
                                                                                        var search = regexps[i],
                                                                                            didMatch = record.get('firstName').match(search) || record.get('lastName').match(search);
    
    
                                                                                        //if it matched the first or last name, push it into the matches array
                                                                                        matched.push(didMatch);
                                                                                    }
    
    
                                                                                             //if nothing was found, return false (dont so in the store)
                                                                                            if (regexps.length > 1 && matched.indexOf(false) != -1) {
                                                                                                return false;
                                                                                            } else {
                                                                                                //else true true (show in the store)
                                                                                                return matched[0];
                                                                                            }
    
    
                                                                                });
                                                                            }
                                                                                
                                                                            }
                {
                                xtype: 'carousel',
    
    
                                defaults: {
                                    styleHtmlContent:true,
                                     scrollable:true,
                                
                                
                                },
    
    
                                items: [
                                    {
    
    
                                       style: {
                                                                    backgroundImage: 'url(resources/img/Landscape.png)',
                                                                    backgroundRepeat: 'no-repeat',
                                                                    backgroundPosition: 'center'          
                                                },
                                        id:'mypanel1'
    
    
                                    },
                                  
                                    {   
                                        xtype:'video',
                                        autoResume:true,
                                        autoPause:true,
                                        width:'100%',
                                        height:'80%',
                                        align:'center',
                                        
                                        
                                     
                                        url:['resources/video/domates_corbasi.mp4'],
    
    
                                        /*style: {
                                                                   backgroundImage: 'url(resources/img/Landscape.png)',
                                                                    backgroundRepeat: 'no-repeat',
                                                                    backgroundPosition: 'center'         
                                                },*/
                                        
                                        id:'myvideo'
                                    }
                                ]
                            }
            ]
        }
        
    });

    I just wrote same search code for my project but i can't run search , i really looked various ways to handle the problem but i couldn't figure out what's going on.

    I'm looking for help asap thanks.

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


    What is it doing? Any errors, anything happening currently?
    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.

Thread Participants: 1

Tags for this Thread

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