PDA

View Full Version : Maximize panel - problem when the content is an iframe



dekely
3 Nov 2013, 7:36 PM
Hi All,
I've implemented a maximized panel by simply remove it from it's parent and add it to a window.
It works great except when the content is an iframe, when I added it to a window the iframe reloads it's source.


Notes:
1. I do not explicitly remove it, I just add it to the window and that causes to remove it from its parent
2. The maximize method is implemented on the panel itself

Thanks for any help or hint.


Code snippet:


maximizeTab: function(){
var me = this;
var w = new Ext.window.Window({
maximizable: true,
maximized: true,
id: 'maximizedTabWindow',
layout:'fit',
closeAction: 'close',
title: me.title,
closable: false,
items: me,
listeners:{
restore: function(win){
//add the tab again
var tab = win.items.get(0);
Ext.getCmp(tab.itemId+'-wrapper').add(tab);
w.destroy();
}
}
});
w.show(me);
}

s000rd
3 Nov 2013, 7:52 PM
Iframe will refresh when move it in IE9, IE10, you can add follow tag in you page:
<meta http-equiv="x-ua-compatible" content="IE=7" />
But if you do this, the page will analysis by IE7, the html5 element don't be work and the page style need to adjust.

dekely
3 Nov 2013, 8:14 PM
ok,
so how about using a window instead of a panel? then I won't have to move it.
Can I use a window as a panel child or as a tab in a tabpanel?