class jqOrg extends jqGrid
{
protected function init()
{
#Set database table
$this->table = BEZ_DBPREFIX .'orgStruct';
$this->nav = array(
#Set common nav actions
'add' => true,
'edit' => true,
'del' => true,
'view' => true,
'search' => true,
'refresh' => true,
#Set text labels. It's better to set them in defaults
'addtext' => 'Add',
'edittext' => 'Edit',
'deltext' => 'Delete',
'viewtext' => 'View',
#Set common excel export
'excel' => true,
//'exceltext' => 'Excel',
#Set ading params
'prmAdd' => array('width' => 400,
'bottominfo' => 'Custom info came from PHP!',
'closeAfterAdd' => true,
'recreateForm' => true),
#Set editing params
'prmEdit' => array('width' => 400,
'bottominfo' => 'Custom info came from PHP!',
'viewPagerButtons' => false,
'checkOnUpdate' => true,
'checkOnSubmit' => true,
'closeAfterEdit'=> true),
);
#Make all columns editable by default
$this->cols_default = array('editable' => true);
#Set columns
$this->cols = array(
'id' => array(
'label' => 'id',
'width' => 75,
'align' => 'center',
'key' => true,
'editable' => false, //id is non-editable
),
'name' => array('label' => 'Название',
'width' => null,
'shrinkToFit' => false,
'editrules' => array('required' => true),
),
'shortName' => array('label' => 'Короткое название',
'width' => null,
'shrinkToFit' => false,
'editrules' => array('required' => true),
),
);
#Add filter toolbar
$this->render_filter_toolbar = true;
}
}