1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
cm = new Ext.grid.ColumnModel({
id: 'mycolmodel',
// specify any defaults for each column
defaults: {
sortable: true // columns are not sortable by default
},
columns: [
checkColumn,
{
id: 'nom_piege',
header: 'Code',
dataIndex: 'nom_piege',
width: 75,
allowBlank: true
},{
id: 'commune',
header: 'commune',
dataIndex: 'nom',
width: 75,
allowBlank: true
},{
id: 'etat_piege',
header: 'Etat_piege',
dataIndex: 'etat_piege',
width: 250,
allowBlank: true,
editor: new fm.ComboBox({
id : 'combo',
triggerAction: 'all',
displayField: 'name',
valueField: 'name',
allowBlank: true,
store: new Ext.data.JsonStore({
autoload: true,
url: './capture/saisi/serveur_etat.php',
root: 'lesetat', //Nom de la racine tableau JSON
fields:['id', 'name']
})
})
},{
id: 'effectif',
header: 'Effectifs',
align: 'center',
renderer: function(value, metadata, record) {
tp = '<?php echo $_SESSION['type_piege'];?>';
if (( typ_piege == 1) || (tp == 1))
{
return '<a onclick="frm_effectif_pondoir.show();" target="_blank" ><img src="./logo/AddFileButton.png" width="20" align="center"></a>';
}
else
{
return '<a onclick="frm_effectif.show();" target="_blank" ><img src="./logo/AddFileButton.png" width="20" align="center"></a>';
}
}
} |