//
ccip.fdgp.EffectifGrid = Ext.extend(Ext.grid.GridPanel, {
  initComponent:function() {
  
  Ext.apply(this, {
  id:'effectifgrid-id',
  cls: 'x-custom-grid',
  loadMask: {msg: 'Chargement table des effectifs...'},
  //title:  'Liste categories effectifs',
  stripeRows: true,
  frame:  true,
  store: new Ext.data.SimpleStore({
    fields:[
      {name:'effectif'}
   ],
  data:[
        ['0 salarié'],
        ['1 à 2 salariés'],
        ['3 à 5 salariés'],
        ['6 à 9 salariés'],
        ['10 à 19 salariés'],
        ['20 à 49 salariés'],
        ['50 à 99 salariés'],
        ['100 à 199 salariés'],
        ['200 à 249 salariés'],
        ['250 à 499 salariés'],
        ['500 à 999 salariés'],
        ['1000 à 1999 salariés'],
        ['2000 à 4999 salariés'],
        ['5000 à 9999 salariés'],
        ['10000 salariés et plus']
    ]
  }),
  columns:[
   {id:'effectif',header: "Liste categories effectifs", width: 40, sortable: false, dataIndex: 'effectif', menuDisabled: true}
  ],
  bbar:[{
				scope:  this,
				handler: this.print,
				iconCls:'x-custom-icon-imprimer'				
			}],
  /*
  buttons: [
            {
              //text:    'Fermer', // fermer
				//icon: 'image/fr/fermer.gif',
				iconCls:'x-custom-icon-fermer',
              scope:   this,
              handler: this.close
            },
            {
              //text:  'Imprimer',
			  //icon: 'image/gimp.gif',
			  iconCls:'x-custom-icon-imprimer',
              scope:  this,
              handler: this.print
              //cls: 'x-btn-text-icon',
              //icon: 'image/papier.gif'
            }
     ],
  */
  
    viewConfig:{forceFit:true, enableRowBody:true, getRowClass:this.getRowClass}
    }); // eo apply

    // call parent
    ccip.fdgp.EffectifGrid.superclass.initComponent.apply(this, arguments);
  },
 
  close:function() {
	Ext.getCmp('effectifwin-id').close();
  }, // eo function cancel
  
  print:function() {
    this.el.print({grid: this, title: 'Liste des effectifs'});
  }
 
});

Ext.reg('effectifgrid', ccip.fdgp.EffectifGrid);


//Ext.onReady(function() {
//
//  Ext.QuickTips.init();
//  
//  var w = new Ext.Window({
//  id:'rowbody-win'
 //// ,title:Ext.get('page-title').dom.innerHTML
// ,width:400
// ,height:300
// ,plain:true
// ,layout:'fit'
// ,border:false
// ,closable:false
// ,items:{xtype:'effectifgrid',id:'rowbody-grid'}
// });
// w.show();  
  
//}); // eo function onReady


