PDA

View Full Version : Fileupload change its style when reset



vizcano
3 Mar 2010, 2:05 AM
Hi

I'm using Condor's override to reset fileupload fields http://www.extjs.com/forum/showthread.php?p=262550 it works but on IE during the process, remove and recreate field the button changes as you can see at the screenshots attached.

My question is that is there a way to avoid this happend? Sleeping the code or something...Thanks for your help

vizcano
3 Mar 2010, 3:31 AM
Finally i find a solution, it may be not the best but it works



reset : function(){
this.fileInput.removeAllListeners();
this.fileInput.remove();
this.createFileInput();
var btnCfg = Ext.applyIf(this.buttonCfg || {}, {
text: this.buttonText
});
this.button = new Ext.Button(Ext.apply(btnCfg, {
renderTo: this.wrap,
cls: 'x-form-file-btn' + (btnCfg.iconCls ? ' x-btn-icon' : '')
}));
this.addFileListener();
Ext.form.FileUploadField.superclass.reset.call(this);
}