-
Notifications
You must be signed in to change notification settings - Fork 4
docs01 Columns
Christos Pontikis edited this page Jun 18, 2017
·
2 revisions
$a_columns = array(
'column1' => array(
'header' => 'Column Header',
'display' => C_PHP_BS_GRID_COLUMNS_DEFAULT,
'th_class' => 'text-nowrap my-class',
'td_class' => 'my-class',
'select_sql' => 'columns1',
'sort_simple' => true,
// optional
'sort_simple_default' => true,
'sort_simple_default_order' => 'ASC',
),
);
Use $_SESSION to store criteria. Then make an ajax call to get them.
Another option to pass criteria to javascript is to post json_encode
to criteria array.
Otherwise, define:
criteria: {
'description': {
type: "text",
params_html: {
label_id: "foo",
dropdown_id: "foo",
input_id: "foo",
dropdown_value: "foo",
input_value: "foo",
msg_missing_operator: "foo",
msg_missing_value: "foo",
minchars: 2,
msg_minchars: "foo"
}
},
'customers_id': {
type: "autocomplete",
params_html: {
filter_id: "foo",
autocomplete_id: "foo",
filter_value: "foo",
autocomplete_value: "foo",
autocomplete_params: {
source: "/url/to/ajax_autocomplete.php",
minLength: 2,
delay: 500
}
}
},
'status': {
type: "multiselect_checkbox",
params_html: {
group_value: foo
items: [
{
input_id: "foo1",
input_value: "foo1",
default_checked_status: true
},
{
input_id: "foo2",
input_value: "foo2",
default_checked_status: true
},
{
input_id: "foo3",
input_value: "foo3",
default_checked_status: true
},
{
input_id: "foo4",
input_value: "foo4",
default_checked_status: true
}
],
msg_all_deselected: "foo"
}
},
'date_inserted_from': {
type: "date_start",
params_html: {
label_id: null,
dropdown_id: "foo",
input_id: "foo",
dropdown_value: "foo",
input_value: "foo",
associated_criteria_name: "foo",
msg_missing_operator: "foo",
msg_missing_value: "foo",
show_time: true,
datepicker_params: {
dateFormat: "d/m/yy",
changeMonth: true,
changeYear: true,
showButtonPanel: true,
timeFormat: "HH:mm",
stepMinute: 5
}
}
},
'date_inserted_until': {
type: "date_end",
params_html: {
label_id: "foo",
dropdown_id: "foo",
input_id: "foo",
dropdown_value: "foo",
input_value: "foo",
msg_missing_operator: "foo",
msg_missing_value: "foo",
show_time: true,
datepicker_params: {
dateFormat: "d/m/yy",
changeMonth: true,
changeYear: true,
showButtonPanel: true,
timeFormat: "HH:mm",
stepMinute: 5
}
}
}
}