Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User sailei1's Avatar
    Join Date
    Jul 2011
    Location
    BeiJing China
    Posts
    43
    Vote Rating
    0
    sailei1 is on a distinguished road

      0  

    Default List store Refresh problem

    List store Refresh problem


    Code:
    /**
     * 
     * 内网邮件
     */
    Ext.define("email.view.Contact", {
        extend: 'Ext.Panel',
        xtype:'mailContact', 
        requires:['Ext.List','email.view.Three'],
        config: {
         fullscreen:true,
         select:[],
         s:'',
         overlay:'',
         layout: 'hbox',
         items:[{xtype:'toolbar',docked:'top',items:[{xtype:'button',text:'返回',handler:function(){
            var form= Ext.Viewport.query('mailVCreate')[0],con=Ext.Viewport.query('mailContact')[0];
            Ext.Viewport.setActiveItem(form);
            con.destroy();
             
         }},{xtype:'spacer'},{xtype:'button',text:'已选择',handler:function(){
             debugger;
             var me=this,con=me.getParent().getParent(),data=con.getSelect(),store = Ext.getStore('Select');
             if(data.length<1){
              Ext.Msg.alert('<p>选择</p>', '<p style="color:#fff;">您没有选择用户</p>');
             return;
             }else{
    // The bug start
                  store.removeAll();
                    store.setData(data);
                    //store.applyData(data);
                    store.sync();
                    console.log(data.length +'--------    contrast -----------' +store.getAllCount());  
    //The bug end                
                if (!this.overlay) {
                    this.overlay= Ext.create('Ext.Panel', {
                                layout:'fit',
                                 modal: true,
                               hideOnMaskTap: true,
                               width: Ext.os.deviceType == 'Phone' ? 260 : 400,
                               height: Ext.os.deviceType == 'Phone' ? 220 : 400,
                              
                               items: [
                                   {
                                       docked: 'top',
                                       xtype: 'titlebar',
                                       title: '<p>已选择</p>'
                                   },
                                   
                                   {
                                       xtype:'list',
                                       itemTpl: '{name}',
                                       emptyText:'暂无数据',
                                       //scrollable: true,
                                       store:'Select',
                                       listeners:{'itemtap':function(list,index,target,record,e,eOpts){
                                      //debugger;
                                      var store= list.getStore(),id=record.get('id'),me=Ext.Viewport.query('mailContact')[0];
                                      store.removeAt(index);
                                      store.sync();
                                      
                                      var d=store.getData().all;
                                      var  selects=new Array();
                                      for(var i=0;i<d.length;i++){
                                          selects.push({'id':d[i].data.id,'email':d[i].data.email,'name':d[i].data.name});
                                      }
                                      document.getElementById(id).className='x-list-item';
                                      me.setSelect(selects);
                                      
                                       }}
                                   }
                               ],
                })
                }
                this.overlay.showBy(me);
              
             }
         }},{xtype:'button',text:'完成',handler:function(){
            
         var form= Ext.Viewport.query('mailVCreate')[0],con=this.getParent().getParent(),select=con.getSelect(),name=con.getS(),btn=con.query('button[text="已选择"]')[0];
         var  value='';
          for(var i=0;i<select.length;i++){
              value+=select[i].email+',';
          }
          if(value){value=value.substr(0,value.length-1);}
         var css='textfield[name='+name+']';
           form.query(css)[0].setValue(value);
            Ext.Viewport.setActiveItem(form);
           if(btn.overlay){btn.overlay.destroy();}
            con.destroy();
         
         }}]}
                ,{
                     xtype: 'list',
                     flex: 1,
                     masked:true,
                         style:{'background': 'url(resources/images/sidebar_bg.png) top right repeat-y #f7f7f7','padding-right':'15px'},
                         itemTpl:'<p style="font-size:13px;margin-left:-0.4em;">{Orgname}</p>',
                         emptyText:'暂无数据',
                     showAnimation:{type: 'slide',direction: 'right',duration: 300},
                     store: 'Deps',
                     listeners:{
                        'itemtap':function(list,index,target,record,e,eOpts){
                        //debugger;
                        var store = list.getStore(),
                             concactStore=Ext.getStore('Peoples'),
                             user=window.localStorage.getItem("user"),
                             depId=record.get('Orgid');
                        
                           var url='http://211.136.93.58/addressBook/html5Index.do';
                            if(depId=='1'){  
                                   var proxy={type:'jsonp',url: url,
                                extraParams:{Invok:'getFirLevUsers',userCode:user,portalId:'html5_portal'},
                                reader:{type:'json',rootProperty:'data'},
                                callbackKey:'callback'};
                                concactStore.setProxy(proxy);  
                            }else{
                            var proxy={type:'jsonp',url: url,
                            extraParams:{Invok:'getUsersByDepId',deptID:depId,userCode:user,portalId:'html5_portal'},
                            reader:{type:'json',rootProperty:'data'},
                            callbackKey:'callback'};
                            concactStore.setProxy(proxy);}
                            concactStore.removeAll();
                            try{concactStore.load();
                                        
                                     concactStore.sync();
                                     }catch(e){}
                        }
                     }
         },{
                     xtype: 'list',
                     masked:true,
                     emptyText:'<p style="font-size:13px">暂无数据</p>',
                     itemTpl: '<div style="height:50px;font-size:13px;margin-left:-0.4em;"><table width="100%"><tr><td style="width:60px;"><img width="50" height="50" src="{UserImageB}" style="vertical-align:middle;margin-right:10px;"/></td><td style="text-align:left;">{Username}</td></tr></table></div>',
                         store:'Peoples', 
                         mode: 'MULTI',
                         listeners: {
    
    
                             itemtap:function(list,index,target,record,e,eOpts){
                                // debugger;
                                 var data=record.getData(),type=record.get('dataType'),caste=record.get('Caste'),selects=this.getParent().getSelect(),s=this.getParent().getS();
                                 if(type=='1'||type=='2'){
                                 var concactStore= Ext.getStore('People'),user=window.localStorage.getItem("user"),id=record.get('Userid');
                                 var url='http://211.136.93.58/addressBook/html5Index.do';
                                 // var url='http://10.4.14.46:8080/addressBook/html5Index.do';
                                 var proxy={type:'jsonp',url: url,
                                 extraParams:{Invok:'getUsersByDepId',deptID:id,userCode:user,portalId:'html5_portal'},
                                 reader:{type:'json',rootProperty:'data'},
                                 callbackKey:'callback'};
                                 concactStore.setProxy(proxy);
                                 try{concactStore.load();  
                                   concactStore.sync();
                                   }catch(e){}
                               var people=Ext.create('email.view.Three',{select:selects,s:s});
                                Ext.Viewport.setActiveItem(people);
                               target.applyCls('x-list-item');
                                }else{
                                    //var process=true;
                               for (var i = 0; i < selects.length; i++) {
                                                if (selects[i].email == data.Email) {
                                                    return;
                                                }
                                                }
                              selects.push({'id':target.getId(),'email':record.get('Email'),'name':record.get('Username')});
                                            this.getParent().setSelect(selects);    
                                }
                             }
                             },
                     flex:3,
         }],
          listeners:{
              'initialize':function(){
                     //// debugger;
                 var me=this, concactStore= Ext.getStore('Peoples'),depStore=Ext.getStore('Deps');
                 var depId=window.localStorage.getItem("deptCode"),user=window.localStorage.getItem("user"),prox={
                     type: 'jsonp',
                    // url: 'http://10.4.14.59:8082/addressBook/html5Index.do',
                    url: 'http://211.136.93.58/addressBook/html5Index.do',
                         extraParams:{Invok:'getAlldepts',userCode:user},
                         callbackKey: 'callback',
                            
                         reader: {
                             type: 'json',
                             rootProperty:'data'
                         },
                 };
                 depStore.setProxy(prox);
                 depStore.load();
                 depStore.sync();
                // depStore.load();
                // var depId=window.localStorage.getItem("deptCode"),user=window.localStorage.getItem("user");
                 if(depId&&depId.length>1){
                 depId= depId.substr(0,2);}
                  //var url='http://10.4.14.46:8080/addressBook/html5Index.do';
                 
                 var url='http://211.136.93.58/addressBook/html5Index.do';
                    if(depId=='1'){  
                           var proxy={type:'jsonp',url: url,
                        extraParams:{Invok:'getFirLevUsers',userCode:user,portalId:'html5_portal'},
                        reader:{type:'json',rootProperty:'data'},
                        callbackKey:'callback'};
                        concactStore.setProxy(proxy);  
                    }else{
                    var proxy={type:'jsonp',url: url,
                    extraParams:{Invok:'getUsersByDepId',deptID:depId,userCode:user,portalId:'html5_portal'},
                    reader:{type:'json',rootProperty:'data'},
                    callbackKey:'callback'};
                    concactStore.setProxy(proxy);} 
                    try{concactStore.load();
                           
                        concactStore.sync();
                        }catch(e){}
                        
                    
                        
    //                var overlay=Ext.Viewport.add({
    //                                 xtype: 'panel',
    //                                 layout:'fit',
    //                                  modal: true,
    //                                  //hidden:true,
    //                                 hideOnMaskTap: true,
    //                                 showAnimation: {
    //                                     type: 'popIn',
    //                                     duration: 250,
    //                                     easing: 'ease-out'
    //                                 },
    //                                 hideAnimation: {
    //                                     type: 'popOut',
    //                                     duration: 250,
    //                                     easing: 'ease-out'
    //                                 },
    //                                 
    //                                 centered: true,
    //                                 width: Ext.os.deviceType == 'Phone' ? 260 : 400,
    //                                 height: Ext.os.deviceType == 'Phone' ? 220 : 400,
    //                                
    //                                 items: [
    //                                     {
    //                                         docked: 'top',
    //                                         xtype: 'titlebar',
    //                                         title: '<p>已选择</p>'
    //                                     },
    //                                     
    //                                     {
    //                                         xtype:'list',
    //                                         itemTpl: '{name}',
    //                                         emptyText:'暂无数据',
    //                                         scrollable: true,
    //                                         store:'Select',
    //                                         listeners:{'itemtap':function(list,index,target,record,e,eOpts){
    //                                        //debugger;
    //                                        var store= list.getStore(),id=record.get('id');
    //                                        store.removeAt(index);
    //                                        store.sync();
    //                                        
    //                                        var d=store.getData().all;
    //                                        var  selects=new Array();
    //                                        for(var i=0;i<d.length;i++){
    //                                            selects.push({'id':d[i].data.id,'email':d[i].data.email,'name':d[i].data.name});
    //                                        }
    //                                        document.getElementById(id).className='x-list-item';
    //                                        me.setSelect(selects);
    //                                        
    //                                         }}
    //                                     }
    //                                 ],
    //                               
    //                             });
    //                overlay.hide();
    //                me.setOverlay(overlay);
                        
                 },
                 'painted':function(){
                      
                  }
          }
         }
        
        })

    Ext version tested:
    • Sencha Touch 2.1.1
    Browser versions tested against:
    • Chrome 11
      • Safari 5.1
    Description:
    • this.overlay List Store exception
    Attached Images
    Chinese

  2. #2
    Sencha User sailei1's Avatar
    Join Date
    Jul 2011
    Location
    BeiJing China
    Posts
    43
    Vote Rating
    0
    sailei1 is on a distinguished road

      0  

    Default


    Test code
    Attached Files
    Chinese

  3. #3
    Sencha User sailei1's Avatar
    Join Date
    Jul 2011
    Location
    BeiJing China
    Posts
    43
    Vote Rating
    0
    sailei1 is on a distinguished road

      0  

    Default


    2.0.1 work fine , 2.1.1 can not work fine
    Chinese

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