Reputation: 41097
I have Viewport as below. The panel2
has a grid which has a PagingToolbar
. It does not show in IE, it shows little in FF. If I don't have the north region, it works fine.
What can be the reason?
Ext.create('Ext.Viewport', {
layout: 'border',
border : 0,
items: [
{
region: 'north',
html : 'Some html'
},
{ region: 'center',
layout:'fit',
split : true,
items : [panel1, panel2]
}
]
});
Here is a similar example : http://jsfiddle.net/edgMV/20/ The buttons are not showing up.
Upvotes: 0
Views: 198
Reputation: 683
I was looking at your Fiddle but there are several things wrong.
items: resultsPanel
in your region panels, you are creating a new panel inside that panelNow for the layout, I don't know what you want exactly, but this might be close: http://jsfiddle.net/laurenzonneveld/kVUEU/4/
var navigate = function (panel, direction) {
var layout = panel.getLayout();
layout[direction]();
Ext.getCmp('move-prev').setDisabled(!layout.getPrev());
Ext.getCmp('move-next').setDisabled(!layout.getNext());
};
Ext.define('App.view.RequestPanel', {
extend: 'Ext.panel.Panel',
alias: 'widget.requestpanel',
title: 'Request Panel',
items: [{
html: 'Sample Result'
}],
bbar: [{
xtype: 'button',
text: 'Search'
}, {
xtype: 'button',
text: 'Reset'
}]
});
Ext.define('App.view.ResultPanel', {
extend: 'Ext.panel.Panel',
alias: 'widget.resultpanel',
title: 'Result Panel',
layout: 'card',
items: [{
xtype: 'panel', // Standard panel, but this could be another super complex panel
html: 'Sample Result 1'
}, {
// Defaults to xtype: 'panel', if no xtype is specified
html: 'Sample Result 2'
}, {
// Defaults to xtype: 'panel', if no xtype is specified
html: 'Sample Result 3'
}, {
// Defaults to xtype: 'panel', if no xtype is specified
html: 'Sample Result 4'
}],
bbar: [{
xtype: 'button',
text: 'Previous',
handler: function (btn) {
navigate(btn.up('panel'), 'prev');
}
}, {
xtype: 'button',
text: 'Next',
handler: function (btn) {
navigate(btn.up('panel'), 'next');
}
}]
});
Ext.create('Ext.container.Viewport', {
layout: 'border',
items: [{
region: 'north',
html: '<h1 class="x-panel-header">Sencha</h1>',
border: false
}, {
xtype: 'requestpanel', // Your super complex panel
region: 'center', // Context specific properties for the panel
layout: 'fit', // Context specific properties for the panel
flex: 1 // Context specific properties for the panel
}, {
region: 'south', // Your super complex panel
xtype: 'resultpanel', // Context specific properties for the panel
flex: 1, // Context specific properties for the panel
collapsible: true, // Context specific properties for the panel
split: true
}]
});
Edit: Updated Fiddle and code example to use Ext.define
Upvotes: 2