PDA

View Full Version : [2.0b1] Grid context menu not aligned



Priet
11 Oct 2007, 12:10 AM
I don't know what you call that context menu but this is it:

http://meuk.peterriet.net/extjsgridbug.jpg

The 'Sort ASC' en 'Sort DESC' are not displayed correctly, maybe a bug in FF: in IE7 there is not a problem.

Other thing: when showing the Columns menu, all the checkboxes are not aligned correctly. Happens in IE7 and FF. I really don't now why this is happening.

mystix
11 Oct 2007, 12:13 AM
hard to tell from the pic alone.

pls post some sample code + any custom css you're using.

Priet
11 Oct 2007, 12:41 AM
My mistake. This is the code:


Ext.onReady(function() {
// Datum velden
dateVanaf = new Ext.form.DateField({
readOnly: true,
format: "d-m-Y",
name: "txtInvallerPeriodeVanaf",
renderTo: "spanInvallerPeriodeVanaf",
value: "11-10-2007"
});
dateTot = new Ext.form.DateField({
readOnly: true,
format: "d-m-Y",
name: "txtInvallerPeriodeVanaf",
renderTo: "spanInvallerPeriodeTot",
value: "17-10-2007"
});

Ext.QuickTips.init();

var grid = Ext.grid;

var expander = new grid.RowExpander({
tpl: new Ext.Template('<p style="padding: 2px 5px 0px 20px;"><b>Adres:<\/b> {adres}, {postcode} {woonplaats}<br><b>Telefoon:<\/b> {telefoonnummer_vast} / {telefoonnummer_mobiel}<br><b>Groepen:<\/b> {groepen}<br><b>Bevoegdheden:<\/b> {bevoegdheden}<\/p><div style="padding: 10px 5px 5px 20px;">{info}<\/div>')
});

var ds = new Ext.data.Store({
url: 'http://marie/web_vco/personeel/invallerzoeken/?view=zoekinvallers',
reader: new Ext.data.XmlReader(
{
record: 'invaller',
id: 'invaller_id',
totalRecords: '@total'
},
["naam", "voornaam", "voorletters", "achternaam", "adres", "postcode", "woonplaats", "telefoonnummer_vast", "telefoonnummer_mobiel", "info",
"groepen", "bevoegdheden",
"mao", "mam", "dio", "dim", "wo", "doo", "dom", "vro", "vrm"]
)
});

var intKolWidth = 25;
var cm = new Ext.grid.ColumnModel([expander, {
header: "Naam",
dataIndex: 'naam'
},
{
header: "Achternaam",
width: 180,
dataIndex: 'achternaam',
hidden: true
}, {
header: "Voornaam",
width: 115,
dataIndex: 'voornaam',
hidden: true
}, {
header: "Woonplaats",
width: 100,
dataIndex: 'woonplaats',
hidden: true
}, {
header: 'mao',
dataIndex: 'mao',
align: 'center',
width: intKolWidth,
renderer: renderInvallerBeschikbaarheid,
resizable: false
}, {
header: 'mam',
dataIndex: 'mam',
align: 'center',
width: intKolWidth,
renderer: renderInvallerBeschikbaarheid,
resizable: false
}, {
header: 'dio',
dataIndex: 'dio',
align: 'center',
width: intKolWidth,
renderer: renderInvallerBeschikbaarheid,
resizable: false
}, {
header: 'dim',
dataIndex: 'dim',
align: 'center',
width: intKolWidth,
renderer: renderInvallerBeschikbaarheid,
resizable: false
}, {
header: 'wo',
dataIndex: 'wo',
align: 'center',
width: intKolWidth,
renderer: renderInvallerBeschikbaarheid,
resizable: false
}, {
header: 'doo',
dataIndex: 'doo',
align: 'center',
width: intKolWidth,
renderer: renderInvallerBeschikbaarheid,
resizable: false
}, {
header: 'dom',
dataIndex: 'dom',
align: 'center',
width: intKolWidth,
renderer: renderInvallerBeschikbaarheid,
resizable: false
}, {
header: 'vro',
dataIndex: 'vro',
align: 'center',
width: intKolWidth,
renderer: renderInvallerBeschikbaarheid,
resizable: false
}, {
header: 'vrm',
dataIndex: 'vrm',
align: 'center',
width: intKolWidth,
renderer: renderInvallerBeschikbaarheid,
resizable: false
} ]);
cm.defaultSortable = true;

var grid1 = new grid.GridPanel({
ds: ds,
cm: cm,
viewConfig: {
forceFit: true
},
height: 300,
plugins: expander,
renderTo: "divInvallerGrid",
loadMask: true
});
ds.load({
params: {
schoolid: 1,
groepen: "1,2,3,4,5,6,7,8",
bevoegdheden: "",
datumvanaf: "06-10-2007",
datumtot: "12-10-2007"
}
});
});I include the following:


<script type='text/javascript' src='/js/extjs/adapter/ext/ext-base.js'></script>
<script type='text/javascript' src='/js/extjs/ext-all-debug.js'></script>
<script type='text/javascript' src='/js/extjs/rowexpander.js'></script>
<script type='text/javascript' src='/js/extjs/source/locale/ext-lang-nl.js'></script>
<link href='/js/extjs/resources/css/ext-all.css' rel='stylesheet' type='text/css'>

jack.slocum
11 Oct 2007, 9:43 AM
Do you have any other CSS included?