PDA

View Full Version : FileUploadField - Layout problems (3.1.1)



MatteoSp
15 Feb 2010, 2:49 AM
I'm working with rel. 3.1.1 and the FileUploadField extension, the layout problems I'm experiencing are visible in the picture I'm attaching.

The code I'm using is:



var uploadField = new Ext.ux.form.FileUploadField
({
xtype: 'fileuploadfield',
id: 'form-file',
emptyText: 'Select an file',
fieldLabel: 'File',
name: 'file-path',
buttonText: '',
buttonCfg: { iconCls: 'upload-icon' }
});

var formPanel = new Ext.form.FormPanel
({
fileUpload: true,
frame: true,
title: 'Import profiles from file',
autoHeight: true,
bodyStyle: 'padding: 10px 10px 0 10px;',
labelWidth: 150,
items: [uploadField],
buttons:
[
{
text: 'Save',
handler: this._OnSaveClick,
scope: this
},
{
text: 'Reset',
handler: function()
{
this.m_FormPanel.getForm().reset();
},
scope: this
}
]
});



This is very frustrating, any help will be really appreciated.

thanks
m.

UPDATE: attachment replaced

MatteoSp
15 Feb 2010, 12:55 PM
Nobody?

carol.ext
15 Feb 2010, 1:09 PM
I'm not "Nobody", but did you include the custom styles and the icon image the example uses? Did it work in a different version and just doesn't work with 3.1.1?

alg
16 Feb 2010, 4:02 AM
Same problem here, just include examples/ux/fileuploadfield/css/fileuploadfield.css custom stylesheet! ;)

wemerson.januario
16 Feb 2010, 7:12 PM
Maybe the problem is in your code intantiating.
See. you are setting xtype in your instantiation.
if you are instantiating new Ext.ux.form.FileUploadField , so you can not set xtype config,
try to comment or remove the

xtype: 'fileuploadfield', line

use this.


var uploadField = new Ext.ux.form.FileUploadField
({
id: 'form-file',
emptyText: 'Select an file',
fieldLabel: 'File',
name: 'file-path',
buttonText: '',
buttonCfg: { iconCls: 'upload-icon' }
});

Bye.

MatteoSp
18 Feb 2010, 8:25 AM
@carol.ext and @alg: yes, the problem was the missing CSS

thanks all
m.

dcwmark
30 Apr 2010, 10:17 AM
Sorry to bother everyone, could someone, please, tell me where I may obtain this stylesheet (examples/ux/fileuploadfield/css/fileuploadfield.css) ?

dcwmark
30 Apr 2010, 12:09 PM
Sorry, nevermind, got it.