PDA

View Full Version : different look in a form with loaded data



Besessener
3 Aug 2010, 11:26 PM
Hi there.

I got a problem that drives me crazy.
Why does the form in a window with loaded data looks different than a one without data?
Please take a look on the attachment.
The form with the loaded data doesn't have a blue background behind the buttonbar. That's all over my project. I would like to have this blue background always.

Now there's the question too, which sourcecode do you need to help me in this.
First i have the declaration of the window:


editAnsprechpartnerWindow = new Ext.Window({
id: 'editAnsprechpartnerWindowId',
title: 'Ansprechpartner bearbeiten',
iconCls: 'pencil',
modal: true,
resizable: false,
width: 470,
height: 340,
plain: true,
items:[{
xtype: 'tabpanel',
activeTab:0,
items: [{
xtype: 'form',
title: 'Details',
id: 'editAnsprechpartnerFormId',
bodyStyle: 'padding: 10px;',
url: './php/vmms.php',
baseParams: {
task: 'ansprechpartnerEditSubmit'
},
reader: new Ext.data.JsonReader ({
root: 'results',
totalProperty: 'total',
id: 'id',
fields: [
'ansprechpartner_id',
'vorname',
'nachname',
'mail',
'mobil',
'anreden_id',
'orts_id',
'orte_ansprechpartner_id',
'positions_id'
]
}),
defaults: {
anchor : '92%'
},
items: [{
xtype: 'textfield',
fieldLabel: 'Ansprechp.-ID',
name: 'ansprechpartner_id',
readOnly: true
},{
xtype: 'hidden',
fieldLabel: 'Orte-Ansprechpartner ID',
name: 'orte_ansprechpartner_id',
readOnly: true
},
/*{
xtype: 'combo',
id: 'ortAnsprechpartnerEditComboId',
fieldLabel: 'Shop',
name: 'ort',
allowBlank: false,
store: orteComboStore,
displayField:'ortsname',
valueField:'orts_id',
hiddenName:'orts_id',
editable:true,
lazyRender:true,
mode:'remote',
triggerAction:'all',
selectOnFocus:true,
typeAhead: true
},*/
{
xtype: 'combo',
id: 'ortAnsprechpartnerPositionEditComboId',
fieldLabel: 'Position',
name: 'position',
allowBlank: true,
store: positionComboStore,
displayField:'positionsbezeichnung',
valueField:'positions_id',
hiddenName:'positions_id',
editable:false,
lazyRender:true,
mode:'remote',
triggerAction:'all',
selectOnFocus:true
},{
xtype: 'combo',
id: 'ortAnsprechpartnerAnredeEditComboId',
fieldLabel: 'Anrede',
name: 'anrede',
allowBlank: false,
store: anredeComboStore,
displayField:'anrede',
valueField:'anreden_id',
hiddenName:'anreden_id',
editable:false,
lazyRender:true,
mode:'remote',
triggerAction:'all',
selectOnFocus:true
},{
xtype: 'textfield',
fieldLabel: 'Vorname',
name: 'vorname',
allowBlank: true,
maxLength: 50
},{
xtype: 'textfield',
fieldLabel: 'Nachname',
name: 'nachname',
allowBlank: false,
maxLength: 50
},{
xtype: 'textfield',
fieldLabel: 'Mobil',
name: 'mobil',
allowBlank: false,
maxLength: 20
},{
xtype: 'textfield',
fieldLabel: 'Mail',
name: 'mail',
allowBlank: true,
maxLength: 100
}],
buttons: [{
text: 'Speichern',
hidden: true,
id: 'editAnsprechpartnerButtonId',
handler: ansprechpartnerEditSubmit
},{
text: 'Abbrechen',
handler: function () {
editAnsprechpartnerWindow.hide();
Ext.getCmp('editAnsprechpartnerFormId').getForm().reset();
}
}]
},{
xtype: 'grid',
id: 'ansprechpartnerShopListeGridId',
title: 'Ansprechpartner-Shop Liste',
iconCls: 'arrow_switch',
autoScroll:true,
border: false,
store: ansprechpartnerShopListeStore,
loadMask: new Ext.LoadMask(Ext.getBody(), { msg: "Bitte warten ..." }),
selModel: new Ext.grid.RowSelectionModel( { singleSelect: false }),
stripeRows: true,
columns:[{
header: 'ID',
dataIndex: 'orte_ansprechpartner_id',
sortable: true,
hidden: true,
width: 50
},{
header: 'Ort',
dataIndex: 'ortsname',
sortable: true,
width: 300
}],
tbar: [{
text: 'Shop hinzufügen',
iconCls: 'add',
id: 'editAnsprechpartnerNeuerShopId',
hidden: false,
handler: function(){
neuerOrtBeiAnsprechpartnerWindow.show();
}
}]
}]
}]
});

Thanks a lot so far.

Condor
4 Aug 2010, 12:28 AM
The difference is that in the second image the buttons are in a tabpanel (.x-tab-panel-body has a white background).

Besessener
4 Aug 2010, 12:59 AM
Thanks a lot, i changed it in css :)