-
29 Mar 2012 5:46 PM #1
bug in panel ghost function
bug in panel ghost function
The bug is in ext-4.1RC.
See below red font part, which cause exceptions. The ghostPanel is default as a container, so it doesn't have addTool, setTitle and setIconCls function, also it doesn't even have header element.
// private - used for dragging
ghost: function(cls) {
var me = this,
ghostPanel = me.ghostPanel,
box = me.getBox(),
header;
if (!ghostPanel) {
ghostPanel = new Ext.container.Container({
renderTo: document.body,
floating: {
shadow: false
},
frame: (Ext.supports.CSS3BorderRadius && !me.isWindow) ? me.frame : false,
overlapHeader: me.overlapHeader,
headerPosition: me.headerPosition,
baseCls: me.baseCls,
cls: me.baseCls + '-ghost ' + (cls ||'')
});
me.ghostPanel = ghostPanel;
}
ghostPanel.floatParent = me.floatParent;
if (me.floating) {
ghostPanel.setZIndex(Ext.Number.from(me.el.getStyle('zIndex'), 0));
} else {
ghostPanel.toFront();
}
if (!(me.preventHeader || (me.header === false))) {
header = ghostPanel.header;
// restore options
if (header) {
header.suspendLayouts();
Ext.Array.forEach(header.query('tool'), header.remove, header);
header.resumeLayouts();
}
ghostPanel.addTool(me.ghostTools());
ghostPanel.setTitle(me.title);
ghostPanel.setIconCls(me.iconCls);
}
ghostPanel.el.show();
ghostPanel.setPagePosition(box.x, box.y);
ghostPanel.setSize(box.width, box.height);
me.el.hide();
return ghostPanel;
},www.feyasoft.com
Extjs 3.2 based Calendar Spreadsheet Presentation Word
-
30 Mar 2012 6:18 AM #2
Not sure where you're getting that code from, however in RC1 the code reads:
Code:ghost: function(cls) { var me = this, ghostPanel = me.ghostPanel, box = me.getBox(), header; if (!ghostPanel) { ghostPanel = new Ext.panel.Panel({ renderTo: document.body, floating: { shadow: false }, frame: (Ext.supports.CSS3BorderRadius && !me.isWindow) ? me.frame : false, overlapHeader: me.overlapHeader, headerPosition: me.headerPosition, baseCls: me.baseCls, cls: me.baseCls + '-ghost ' + (cls ||'') }); me.ghostPanel = ghostPanel; } // ..... }Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote