Templates y Temas para ExtJS y Sencha Touch Bleext!
Bleextop! un desktop OpenSource para Ext4 y CodeIgniter http://bit.ly/pUwLJO
Iframes en tabpanels
  • Vote Up0Vote Down AlvaroAlvaro October 2011
    Posts: 10
    Hola comunidad, tengo un serio problema, os pongo en situación, tengo dos aplicaciones en ExtJS independientes y en otra aplicación es general y es un tabpanel de dos items y cada uno de ellos es un iframe tal que llama a ambas aplicaciones Extjs, el caso es que la aplicación Extjs que esta oculta o que se carga de forma oculta da un error y la que si se puede mostrar se muestra sin problemas, os presente un codigo de prueba para que lo podais testear y a ver si se os ocurre alguna solución, estoy desesperado :(



    Ext.require(['*'])
    Ext.onReady(function(){
    new Ext.create('Ext.container.Viewport',{
    layout: 'fit',
    //bodyStyle: 'padding: 10px',
    items:[
    {
    xtype: 'tabpanel',
    bodyPadding: 10,
    frame: true,
    border: true,
    //region: 'center',
    //margin: 10,

    items:[
    {
    title: 'Prueba',
    html: 'PRUEBA PANEL'
    },
    {
    xtype: 'component',
    title: 'Notificaciones',
    id: 'iframe-panel',
    autoEl: {
    tag: 'iframe',
    width: '100%',
    height: '100%',
    focusOnLoad: true,
    frameborder: 0,
    src: 'http://docs.sencha.com/ext-js/4-0/'
    }
    }
    ]
    }
    ]
    });
    });
  • 1 Answer sorted by
  • Vote Up0Vote Down AlvaroAlvaro October 2011
    Posts: 10
    SOLUCION: Parece ser que el problema radicaba en la forma en que firefox ocultaba y mostraba los iframes ya que este mismo codigo si funciona baja IE y Chrome, entonces le he metido a la configuración del panel las siguientes lineas:


    defaults:{
    style: {position: !Ext.isIE?'absolute':'relative'},
    hideMode :!Ext.isIE?'visibility':'display'
    }


    quedando:


    Ext.require([
    '*',
    'Ext.ux.tab.VerticalPanel'
    ]);
    Ext.onReady(function(){
    new Ext.create('Ext.container.Viewport',{
    layout: 'fit',
    items:[
    {
    xtype: 'verticaltabpanel',
    id: 'panel-tab',
    bodyPadding: 10,
    border: true,
    plain: false,
    tabsConfig: {
    width: 100,
    marginTop : 0
    },
    //hideMode :!Ext.isIE?'nosize':'display',
    defaults:{
    style: {position: !Ext.isIE?'absolute':'relative'},
    hideMode :!Ext.isIE?'visibility':'display'
    },
    items:[
    {
    iconCls: 'user-ico',
    id: 'p-prueba',
    html: 'PRUEBA PANEL'
    },
    {
    title: 'Sencha',
    id: 'p-sencha',
    html: "<iframe src='http://docs.sencha.com/ext-js/4-0/' width='100%' height='100%' frameborder='0'></iframe>"
    }
    ]
    }]
    });
    });

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Twitter

Sign In Apply for Membership

In this Discussion

Poll

No poll attached to this discussion.

Tagged