From 756b675e2ba6cfe9f2f299ec291a3a4adf64dc6e Mon Sep 17 00:00:00 2001 From: jekkos Date: Sat, 5 Sep 2015 15:05:20 +0200 Subject: [PATCH] use configured dateformat for jquery ui date parser disable sorting on columns 0 and 9 (no data there) default sorting enabled on column 1 --- application/helpers/table_helper.php | 2 +- application/views/sales/manage.php | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/application/helpers/table_helper.php b/application/helpers/table_helper.php index 87ae30168..7a75dce9e 100644 --- a/application/helpers/table_helper.php +++ b/application/helpers/table_helper.php @@ -67,7 +67,7 @@ function get_sales_manage_sale_data_row($sale, $controller) $width = $controller->get_form_width(); $table_data_row=''; - $table_data_row.=''; + $table_data_row.=''; $table_data_row.=''.'POS ' . $sale['sale_id'] . ''; $table_data_row.=''.date( $CI->config->item('dateformat') . ' ' . $CI->config->item('timeformat'), strtotime($sale['sale_time']) ).''; $table_data_row.=''.character_limiter( $sale['customer_name'], 25).''; diff --git a/application/views/sales/manage.php b/application/views/sales/manage.php index 2865199fa..fb2d75843 100755 --- a/application/views/sales/manage.php +++ b/application/views/sales/manage.php @@ -147,11 +147,13 @@ function init_table_sorting() $("#sortable_table").tablesorter( { sortList: [[1,0]], - dateFormat: 'dd-mm-yyyy', + dateFormat: 'config->item('dateformat')); ?>', headers: { - 0: { sorter: 'datetime'}, - 8: { sorter: 'invoice_number'} + 0: { sorter: false}, + 7: { sorter: 'false'}, + 8: { sorter: 'invoice_number'}, + 9: { sorter: 'false'} } }); }