use configured dateformat for jquery ui date parser

disable sorting on columns 0 and 9 (no data there)
default sorting enabled on column 1
This commit is contained in:
jekkos
2015-09-05 15:05:20 +02:00
parent 1d65ceaccf
commit 756b675e2b
2 changed files with 6 additions and 4 deletions

View File

@@ -67,7 +67,7 @@ function get_sales_manage_sale_data_row($sale, $controller)
$width = $controller->get_form_width();
$table_data_row='<tr>';
$table_data_row.='<td width="3%"><input type="checkbox" id="sale_"' . $sale['sale_id'] . ' value="' . $sale['sale_id']. '" /></td>';
$table_data_row.='<td width="3%"><input type="checkbox" id="sale_' . $sale['sale_id'] . '" value="' . $sale['sale_id']. '" /></td>';
$table_data_row.='<td width="15%">'.'POS ' . $sale['sale_id'] . '</td>';
$table_data_row.='<td width="17%">'.date( $CI->config->item('dateformat') . ' ' . $CI->config->item('timeformat'), strtotime($sale['sale_time']) ).'</td>';
$table_data_row.='<td width="23%">'.character_limiter( $sale['customer_name'], 25).'</td>';

View File

@@ -147,11 +147,13 @@ function init_table_sorting()
$("#sortable_table").tablesorter(
{
sortList: [[1,0]],
dateFormat: 'dd-mm-yyyy',
dateFormat: '<?php echo dateformat_jquery($this->config->item('dateformat')); ?>',
headers:
{
0: { sorter: 'datetime'},
8: { sorter: 'invoice_number'}
0: { sorter: false},
7: { sorter: 'false'},
8: { sorter: 'invoice_number'},
9: { sorter: 'false'}
}
});
}