1. #1
    Sencha User
    Join Date
    Sep 2010
    Location
    Valencia, Spain
    Posts
    66
    Vote Rating
    0
    anpegar is on a distinguished road

      0  

    Default Align in HBOX panel.

    Align in HBOX panel.


    Hi folk, i have the following case:

    When i load my web page the components of north zone are shown piled up but when i execute reload (F5) of web page the components are shown ok, Why? any idea?

    With error, appears when i access the first time:
    withError.png

    Without error, appears when i reload the web:
    withoutError.png


    part of my code:
    PHP Code:
    <script>
    Ext.onReady(function(){
     var 
    newError = new Ext.ux.MenuItem({
          
    id'newError',        
          
    text'Nuevo Error',
            
    handlerdatNewError
      
    });               
     
      var 
    newCons = new Ext.ux.MenuItem({
          
    id'newCons',        
          
    text'Nueva Consulta',
            
    handlerdatNewCons
      
    });               
     
      var 
    newDes = new Ext.ux.MenuItem({
          
    id'newDes',        
          
    text'Nuevo Desarrollo',
            
    handlerdatNewDes
      
    });               
     
      var 
    consTareas = new Ext.ux.MenuItem({
          
    id'consTareas',        
          
    text'Consulta de Incidencias',
            
    handlerdatConsTareas
      
    });               
     
      var 
    infTareas = new Ext.ux.MenuItem({
          
    id'infTareas',        
          
    text'Informe de Incidencias',
            
    handlerdatInfTareas
      
    });               
     
      var 
    menuTarea = new Ext.ux.Menu({
          
    id'menuTarea',        
          
    items: [newError,newCons,newDes,'-',consTareas,infTareas]
      });               
     
        var 
    btnTarea = new Ext.ux.Button({
                
    id'btnTarea',
                
    text'Incidencias',
                  
    icon'/productos_v2/web/fima/apl_sopor/tarea.png',
                  
    cls'x-btn-text-icon',
                  
    menumenuTarea        
        
    });
     
        var 
    btnAyudaERP = new Ext.ux.Button({
                
    id'btnAyudaERP',
                
    cls'x-btn-text',
                  
    text'Ayudas Expert ERP',
                  
    handlerdatAyudasExpert        
        
    });
     
        var 
    btnPaqueteConsultas = new Ext.ux.Button({
                
    id'btnPaqueteConsultas',
                
    hiddenfalse,
                  
    cls'x-btn-text',
                  
    text'Contratar Paquete de Consultas',
                  
    handlerdatContratarPaquete        
        
    });
     
        var 
    btnEvalPdtes = new Ext.ux.Button({
                
    id'btnEvalPdtes',
                
    hiddentrue,
                  
    tooltip'Hay evaluaciones pendientes de realizar.',
                  
    tooltipType'title',
                  
    icon'/productos_v2/web/fima/apl_sopor/exclamation.png',
                  
    cls'x-btn-text-icon',
                  
    handlerdatOpenEval        
        
    });
     
        var 
    imgLogoData = new Ext.ux.BoxComponent({
            
    id'imgLogoData',        
            
    autoEl: {tag:'img',src:'/productos_v2/web/fima/apl_sopor/logo_datadec.png'},
                
    margins'0 2 0 2',
                
    style: {cursor:'pointer'},
                
    listeners: {render: function(c){ c.getEl().on('click', function(e){window.open('http://www.datadec.es','_blank');});}}
        });               
     
        var 
    imgLogoDdol = new Ext.ux.BoxComponent({
            
    id'imgLogoDdol',        
            
    autoEl: {tag:'img',src:'/productos_v2/web/fima/apl_sopor/logo_ddol.png'},
                
    margins'0 2 0 2',
                
    style: {cursor:'pointer'},
                
    listeners: {render: function(c){ c.getEl().on('click', function(e){window.open('http://www.ddol.es','_blank');});}}
        });               
     
        var 
    mySpacer1 = new Ext.ux.Spacer({
            
    id'mySpacer1',        
            
    width100
        
    });               
     
        var 
    titulo = new Ext.ux.BoxComponent({
            
    id'titulo',        
            
    html'<span class="textoTitPortalClte" >Bienvenido JESUS GOMEZ, S.L.<br></span><span class="textoTitPortalClteP" >usuario conectado: Jesús Gómez S.L. </span>'
        
    });               
     
        var 
    mySpacer2 = new Ext.ux.Spacer({
            
    id'mySpacer2',        
            
    flex1
        
    });               
     
        var 
    imgContacto = new Ext.ux.BoxComponent({
            
    id'imgContacto',        
            
    tooltip'(SOLICITAR_INF_COMERCIAL)',
                
    autoEl: {tag:'img',src:'/productos_v2/web/fima/apl_sopor/contacto.png'},
                
    margins'0 2 0 2',
                
    style: {cursor:'pointer'},
                
    listeners: {render: function(c){ c.getEl().on('click', function(e){solicitudInfo('jgomez');});}}
        });               
     
        var 
    toolbarTareas = new Ext.ux.Toolbar({
            
    id'toolbarTareas',        
            
    height30,
                
    items: [btnTarea,'-',btnAyudaERP,btnPaqueteConsultas,'->',btnEvalPdtes]
        });        
     
        var 
    solicitudInfo = function (pUsr){
     
               var 
    newX  document.body.scrollLeft document.body.clientWidth/620/2;
               var 
    newY  document.body.scrollTop document.body.clientHeight/268/2;
               
    winInfo.setPosition(newX,newY);
               
    winInfo.show();
     
        };                    
     
        var 
    bSugerencias = function (pUsr){
     
               var 
    newX  document.body.scrollLeft document.body.clientWidth/620/2;
               var 
    newY  document.body.scrollTop document.body.clientHeight/320/2;
     
               
    winSuge.setPosition(newX,newY);
               
    winSuge.show();
     
        };                    
     
        var 
    zonaNorte = new Ext.ux.Panel({
            
    id'zonaNorte',        
            
    layout'hbox',
                
    layoutConfig: {align:'middle'},
                
    autoScrollfalse,
                
    borderfalse,
                
    boxMinHeight77,
                
    bodyStyle'background-color:#D1DFF0',
                
    bbartoolbarTareas,
                
    items: [imgLogoData,imgLogoDdol,mySpacer1,titulo,mySpacer2,imgContacto]
        });     
        var 
    vpHome = new Ext.ux.Viewport({
          
    id'vpHome',        
          
    layout'border',
          
    autoScrolltrue,
          
    renderToExt.getBody(),
          
    items: [zNorte,zCentro,zEste]
        });             
     
        
    zonaNorte.syncSize();    
        
    zonaNorte.syncSize();
     }); 
    //end onReady
    </script> 
    Last edited by anpegar; 23 Dec 2010 at 4:30 AM. Reason: SOLVED

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    The hbox layout can't determine the width of your images, because they haven't loaded yet.

    You will need to specify a fixed 'width' on all your BoxComponents with images.

  3. #3
    Sencha User
    Join Date
    Sep 2010
    Location
    Valencia, Spain
    Posts
    66
    Vote Rating
    0
    anpegar is on a distinguished road

      0  

    Default


    Yes, work fine !!
    Condor, Thank you very much.

Similar Threads

  1. Align items in layout HBOX
    By aperez in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 6 Aug 2010, 3:17 AM
  2. tabpanel width into a panel with a hbox layout
    By McCornic in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 22 Apr 2010, 2:12 AM
  3. How to make the form panel or any other panel align center?
    By webdings in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 23 Sep 2009, 3:21 PM
  4. [3.0 RC3]Issue with HBox layout and Align Middle
    By robertoroberto in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 6 Jul 2009, 12:43 AM

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar