PDA

View Full Version : link in layout 4.1



douglasfab
6 Jun 2012, 2:37 PM
Personal'm using a layout extjs 4.1 .. (I downloaded the layout: http://dev.sencha.co...ut/complex.html) Well so far so good. I made the right a few lines to make a link that must open the page in the center .. i do not know how to do ... For example the pages are already done just need to play them inside the center when you click someone can give me an example: Below I have to put a link on the line "search" in html and open when you click open a new page layout in the center within the normal keeping the other regions ...




{
region: 'west',
stateId: 'navigation-panel',
id: 'west-panel', // see Ext.getCmp() below
title: 'Menu Principal',
split: true,
width: 200,
minWidth: 175,
maxWidth: 300,
collapsible: true,
animCollapse: true,
margins: '0 0 0 5',
layout: 'accordion',
items: [
title: 'Pesquisar',
html: '<p>Pesquisar</p>',
iconCls: 'settings'
},

scottmartin
7 Jun 2012, 12:38 PM
To clarify this, you have a border layout and you want to display a web url in the center region?

Scott.

douglasfab
7 Jun 2012, 6:37 PM
That's right in the center. Sorry the translation'm from Brazil. Thank you.

scottmartin
14 Jun 2012, 1:11 PM
This should work as expected:



Ext.create('Ext.panel.Panel', {
width: 600,
height: 500,
title: 'Border Layout',
layout: 'border',
items: [{
title: 'West Region is collapsible',
region:'west',
xtype: 'panel',
width: 200,
collapsible: true, // make collapsible
layout: 'fit'
},{
title: 'Center Region',
region: 'center', // center region is required, no width/height specified
xtype: 'panel',
html: '<iframe src="http://www.sencha.com" width="100%" height="100%" ></iframe>',
border: false
}],
renderTo: Ext.getBody()
});?


Regards,
Scott.

douglasfab
28 Jun 2012, 7:48 PM
I tried to put an html but not hit. See my code. I need to open that link in the central region. When you click to open the page in the middle of the link.


See the link of my project, the accordion ... SEARCH option:
http://www.emergenciabrasil.com.br/segur/projeto_/inicio.html


See the code:



{
region: 'west',
stateId: 'navigation-panel',
id: 'west-panel', // see Ext.getCmp() below
title: 'Menu Principal',
split: true,
width: 200,
minWidth: 175,
maxWidth: 300,
collapsible: true,
animCollapse: true,
margins: '0 0 0 5',
layout: 'accordion',
items: [{
contentEl: 'west',
title: 'Novo QRU',
//html: '<p>Some settings in here.</p>',
iconCls: 'nav' // see the HEAD section for style used
}, {
title: 'Pesquisar',
html: '<p><a href="login.html#" target="center1"> Pesquisar QRU</a></p>',
iconCls: 'settings'
}, {
title: 'Relatorios',
html: '<p>Total Geral</p><p>Total por Divisao</p><p>Total</p>',
iconCls: 'info'
}, {
title: 'Equipes Guarnicao',
html: '<p> Visualizar Equipes</p><p>Alterar Equipes</p>',
iconCls: 'equipes'


}, {
title: 'BO GCM',
html: '<p> Visualizar BO</p><p>Gerar BO</p>',
iconCls: 'bo_icone'


}],
renderTo: Ext.getBody(),
},

scottmartin
29 Jun 2012, 5:00 AM
Please review my code a little closer in regards to loading the page.

Scott.

douglasfab
29 Jun 2012, 6:52 PM
Yes I did the test you sent me. But this way it opens the link within the region. But I need is to open this link within the central region. That is when you click:
html: '<p> <a href="login.html#" target="center1"> Search </ a> </ p>', ... it opens the page in login.html central region. :-?