After a day of trying to find out mistake. I have made some changes to FileTree extention, so now it works with Extjs 3.0 version.
In file Ext.ux.FileTreeMenu.js
PHP Code:
var uploadPanelConfig = {
contextmenu:this
,buttonsAt:config.buttonsAt || 'tbar'
,singleUpload:config.singleUpload || false
,maxFileSize:config.maxFileSize
,enableProgress:config.enableProgress
};
should be replaced with
PHP Code:
var uploadPanelConfig = {
hideOnClick:false
,cmd:'upload-panel'
,contextmenu:this
,buttonsAt:config.buttonsAt || 'tbar'
,singleUpload:config.singleUpload || false
,maxFileSize:config.maxFileSize
,enableProgress:config.enableProgress
};
PHP Code:
,new Ext.menu.Adapter(new Ext.ux.UploadPanel(uploadPanelConfig), {
hideOnClick:false
,cmd:'upload-panel'
})
with
PHP Code:
,new Ext.ux.UploadPanel(uploadPanelConfig)
in file Ext.ux.FileTreePanel.js
PHP Code:
this.uploadPanel = this.contextmenu.getItemByCmd('upload-panel').component;
replace with
PHP Code:
this.uploadPanel = this.contextmenu.getItemByCmd('upload-panel');
in file Ext.ux.FileUploader.js
PHP Code:
record.set('form', form);
with
PHP Code:
if(Ext.isIE)
record.set('form', undefined); // IE fix, without this it throws an exception
else
record.set('form', form);
in file Ext.ux.form.BrowseButton.js
PHP Code:
this.buttonCt = this.el.child('.x-btn-center em');
with
PHP Code:
this.buttonCt = this.el.child('.x-btn-mc em');
PHP Code:
style: {
position: 'absolute',
cursor: 'pointer',
right: '0px',
top: '10px'
}
with
PHP Code:
style: {
position: 'absolute',
cursor: 'pointer',
right: '0px',
top: Ext.isIE ? '10px' :'0px' // Also another IE fix
}
in file Ext.ux.UploadPanel.js Add line
PHP Code:
this.ownerCt.doLayout();
PHP Code:
,onAddFile:function(bb) {
if(true !== this.eventsSuspended && false === this.fireEvent('beforefileadd', this, bb.getInputFile())) {
return;
}
var inp = bb.detachInputFile();
inp.addClass('x-hidden');
var fileName = this.getFileName(inp);
// create new record and add it to store
var rec = new this.store.recordType({
input:inp
,fileName:fileName
,filePath:this.getFilePath(inp)
,shortName: Ext.util.Format.ellipsis(fileName, this.maxLength)
,fileCls:this.getFileCls(fileName)
,state:'queued'
}, inp.id);
rec.commit();
this.store.add(rec);
this.syncShadow();
this.uploadBtn.enable();
this.removeAllBtn.enable();
this.ownerCt.doLayout();
if(true !== this.eventsSuspended) {
this.fireEvent('fileadd', this, this.store, rec);
}
} // eo onAddFile