Change table links to be glyphicons, fix tooltips sentence in sales/manage, fix sortable columns (#116)

This commit is contained in:
FrancescoUK
2016-03-14 18:40:07 +00:00
parent 983dad87af
commit eb838cdb9f
9 changed files with 43 additions and 45 deletions

View File

@@ -14,6 +14,8 @@ function get_sales_manage_table($sales, $controller)
$CI->lang->line('sales_change_due'),
$CI->lang->line('sales_payment'),
$CI->lang->line('sales_invoice_number'),
'&nbsp',
'&nbsp',
'&nbsp');
$table.='<thead><tr>';
@@ -50,11 +52,11 @@ function get_sales_manage_table_data_rows($sales, $controller)
if($table_data_rows == '')
{
$table_data_rows .= "<tr><td colspan='10'><div class='alert alert-dismissible alert-info'>".$CI->lang->line('sales_no_sales_to_display')."</div></td></tr>";
$table_data_rows .= "<tr><td colspan='12'><div class='alert alert-dismissible alert-info'>".$CI->lang->line('sales_no_sales_to_display')."</div></td></tr>";
}
else
{
$table_data_rows .= "<tr class='static-last'><td>&nbsp;</td><td>".$CI->lang->line('sales_total')."</td><td>&nbsp;</td><td>&nbsp;</td><td>".to_currency($sum_amount_tendered)."</td><td>".to_currency($sum_amount_due)."</td><td>".to_currency($sum_change_due)."</td><td colspan=\"3\"></td></tr>";
$table_data_rows .= "<tr class='static-last'><td>&nbsp;</td><td>".$CI->lang->line('sales_total')."</td><td>&nbsp;</td><td>&nbsp;</td><td>".to_currency($sum_amount_tendered)."</td><td>".to_currency($sum_amount_due)."</td><td>".to_currency($sum_change_due)."</td><td colspan=\"5\"></td></tr>";
}
return $table_data_rows;
@@ -75,13 +77,9 @@ function get_sales_manage_sale_data_row($sale, $controller)
$table_data_row.='<td width="8%">'.to_currency( $sale['change_due'] ).'</td>';
$table_data_row.='<td width="12%">'.$sale['payment_type'].'</td>';
$table_data_row.='<td width="8%">'.$sale['invoice_number'].'</td>';
$table_data_row.='<td width="8%" class="print_hide">';
$table_data_row.=anchor($controller_name."/edit/" . $sale['sale_id'], $CI->lang->line('common_edit'), array('class'=>'modal-dlg modal-btn-delete modal-btn print_hide', 'title'=>$CI->lang->line('common_edit')));
$table_data_row.='&nbsp;&nbsp;&nbsp;&nbsp;';
$table_data_row.=anchor($controller_name."/receipt/" . $sale['sale_id'], $CI->lang->line('sales_show_receipt'), array('class'=>'print_hide', 'title'=>$CI->lang->line('sales_show_receipt')));
$table_data_row.='&nbsp;&nbsp;&nbsp;&nbsp;';
$table_data_row.=anchor($controller_name."/invoice/" . $sale['sale_id'], $CI->lang->line('sales_show_invoice'), array('class'=>'print_hide', 'title'=>$CI->lang->line('sales_show_invoice')));
$table_data_row.='</td>';
$table_data_row.='<td width="5%" class="print_hide">'.anchor($controller_name."/edit/" . $sale['sale_id'], '<span class="glyphicon glyphicon-edit"></span>', array('class'=>'modal-dlg modal-btn-delete modal-btn-submit', 'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%" class="print_hide">'.anchor($controller_name."/receipt/" . $sale['sale_id'], '<span class="glyphicon glyphicon-print"></span>', array('title'=>$CI->lang->line('sales_show_receipt'))).'</td>';
$table_data_row.='<td width="5%" class="print_hide">'.anchor($controller_name."/invoice/" . $sale['sale_id'], '<span class="glyphicon glyphicon-list-alt"></span>', array('title'=>$CI->lang->line('sales_show_invoice'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
@@ -173,7 +171,7 @@ function get_person_data_row($person,$controller)
$table_data_row.='<td width="20%">'.character_limiter($person->first_name,13).'</td>';
$table_data_row.='<td width="30%">'.mailto($person->email,character_limiter($person->email,22)).'</td>';
$table_data_row.='<td width="20%">'.character_limiter($person->phone_number,13).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$person->person_id", $CI->lang->line('common_edit'), array('class'=>"modal-dlg modal-btn-submit", 'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$person->person_id", '<span class="glyphicon glyphicon-edit"></span>', array('class'=>"modal-dlg modal-btn-submit", 'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
@@ -259,7 +257,7 @@ function get_supplier_data_row($supplier,$controller)
$table_data_row.='<td width="22%">'.mailto($supplier->email,character_limiter($supplier->email,22)).'</td>';
$table_data_row.='<td width="17%">'.character_limiter($supplier->phone_number,13).'</td>';
$table_data_row.='<td width="5%">'.character_limiter($supplier->person_id,5).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$supplier->person_id", $CI->lang->line('common_edit'),array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$supplier->person_id", '<span class="glyphicon glyphicon-edit"></span>', array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
@@ -282,6 +280,7 @@ function get_items_manage_table($items,$controller)
$CI->lang->line('items_unit_price'),
$CI->lang->line('items_quantity'),
$CI->lang->line('items_tax_percents'),
$CI->lang->line('items_image'),
'&nbsp;',
'&nbsp;',
'&nbsp;'
@@ -314,7 +313,7 @@ function get_items_manage_table_data_rows($items,$controller)
if($items->num_rows()==0)
{
$table_data_rows.="<tr><td colspan='12'><div class='alert alert-dismissible alert-info'>".$CI->lang->line('items_no_items_to_display')."</div></td></tr>";
$table_data_rows.="<tr><td colspan='13'><div class='alert alert-dismissible alert-info'>".$CI->lang->line('items_no_items_to_display')."</div></td></tr>";
}
return $table_data_rows;
@@ -347,18 +346,16 @@ function get_item_data_row($item,$controller)
$image = '';
if (!empty($item->pic_id))
{
$images = glob ("uploads/item_pics/" . $item->pic_id . ".*");
$images = glob("uploads/item_pics/" . $item->pic_id . ".*");
if (sizeof($images) > 0)
{
$image.='<a class="rollover" href="'. base_url($images[0]) .'"><img src="'.site_url('items/pic_thumb/'.$item->pic_id).'"></a>';
}
}
$table_data_row.='<td align="center" width="55px">' . $image . '</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item->item_id", $CI->lang->line('common_edit'),array('class'=>"modal-dlg modal-btn-new modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="10%">'.anchor($controller_name."/inventory/$item->item_id", $CI->lang->line('common_inv'),array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_count')))./*'</td>';//inventory count
$table_data_row.='<td width="5%">'*/'&nbsp;&nbsp;&nbsp;&nbsp;'.anchor($controller_name."/count_details/$item->item_id", $CI->lang->line('common_det'),array('class'=>"modal-dlg",'title'=>$CI->lang->line($controller_name.'_details_count'))).'</td>';//inventory details
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item->item_id", '<span class="glyphicon glyphicon-edit"></span>', array('class'=>"modal-dlg modal-btn-new modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/inventory/$item->item_id", '<span class="glyphicon glyphicon-pushpin"></span>', array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_count'))).'</td>';//inventory count
$table_data_row.='<td width="5%">'.anchor($controller_name."/count_details/$item->item_id", '<span class="glyphicon glyphicon-list-alt"></span>', array('class'=>"modal-dlg",'title'=>$CI->lang->line($controller_name.'_details_count'))).'</td>';//inventory details
$table_data_row.='</tr>';
return $table_data_row;
@@ -377,8 +374,7 @@ function get_giftcards_manage_table( $giftcards, $controller )
$CI->lang->line('common_first_name'),
$CI->lang->line('giftcards_giftcard_number'),
$CI->lang->line('giftcards_card_value'),
'&nbsp',
);
'&nbsp');
$table.='<thead><tr>';
foreach($headers as $header)
@@ -407,7 +403,7 @@ function get_giftcards_manage_table_data_rows( $giftcards, $controller )
if($giftcards->num_rows()==0)
{
$table_data_rows.="<tr><td colspan='11'><div class='alert alert-dismissible alert-info'>".$CI->lang->line('giftcards_no_giftcards_to_display')."</div></td></tr>";
$table_data_rows.="<tr><td colspan='6'><div class='alert alert-dismissible alert-info'>".$CI->lang->line('giftcards_no_giftcards_to_display')."</div></td></tr>";
}
return $table_data_rows;
@@ -424,7 +420,7 @@ function get_giftcard_data_row($giftcard,$controller)
$table_data_row.='<td width="15%">'.$giftcard->first_name.'</td>';
$table_data_row.='<td width="15%">'.$giftcard->giftcard_number.'</td>';
$table_data_row.='<td width="20%">'.to_currency($giftcard->value).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$giftcard->giftcard_id", $CI->lang->line('common_edit'),array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$giftcard->giftcard_id", '<span class="glyphicon glyphicon-edit"></span>', array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;
@@ -444,8 +440,7 @@ function get_item_kits_manage_table( $item_kits, $controller )
$CI->lang->line('item_kits_description'),
$CI->lang->line('items_cost_price'),
$CI->lang->line('items_unit_price'),
'&nbsp',
);
'&nbsp');
$table.='<thead><tr>';
foreach($headers as $header)
@@ -474,7 +469,7 @@ function get_item_kits_manage_table_data_rows($item_kits, $controller)
if($item_kits->num_rows()==0)
{
$table_data_rows .= "<tr><td colspan='11'><div class='alert alert-dismissible alert-info'>".$CI->lang->line('item_kits_no_item_kits_to_display')."</div></td></tr>";
$table_data_rows .= "<tr><td colspan='7'><div class='alert alert-dismissible alert-info'>".$CI->lang->line('item_kits_no_item_kits_to_display')."</div></td></tr>";
}
return $table_data_rows;
@@ -492,7 +487,7 @@ function get_item_kit_data_row($item_kit, $controller)
$table_data_row.='<td width="20%">'.character_limiter($item_kit->description, 25).'</td>';
$table_data_row.='<td width="15%">'.to_currency($item_kit->total_cost_price).'</td>';
$table_data_row.='<td width="15%">'.to_currency($item_kit->total_unit_price).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item_kit->item_kit_id", $CI->lang->line('common_edit'),array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='<td width="5%">'.anchor($controller_name."/view/$item_kit->item_kit_id", '<span class="glyphicon glyphicon-edit"></span>', array('class'=>"modal-dlg modal-btn-submit",'title'=>$CI->lang->line($controller_name.'_update'))).'</td>';
$table_data_row.='</tr>';
return $table_data_row;

View File

@@ -90,8 +90,8 @@ $lang["sales_sale_time"] = "Time";
$lang["sales_select_customer"] = "Select Customer (Optional)";
$lang["sales_send_invoice"] = "Send Invoice";
$lang["sales_serial"] = "Serial";
$lang["sales_show_invoice"] = "invoice";
$lang["sales_show_receipt"] = "receipt";
$lang["sales_show_invoice"] = "Show Invoice";
$lang["sales_show_receipt"] = "Show Receipt";
$lang["sales_start_typing_customer_name"] = "Start Typing customer's name...";
$lang["sales_start_typing_item_name"] = "Start Typing item's name or scan barcode...";
$lang["sales_stock_location"] = "Stock location";

View File

@@ -21,8 +21,8 @@ function init_table_sorting()
sortList: [[1,0]],
headers:
{
0: { sorter: false},
5: { sorter: false}
0: { sorter: 'false'},
5: { sorter: 'false'}
}
});
}

View File

@@ -34,8 +34,8 @@ function init_table_sorting()
sortList: [[1,0]],
headers:
{
0: { sorter: false},
6: { sorter: false}
0: { sorter: 'false'},
6: { sorter: 'false'}
}
});
}

View File

@@ -102,11 +102,12 @@ function init_table_sorting()
sortList: [[1,0]],
headers:
{
0: { sorter: false},
8: { sorter: false},
9: { sorter: false},
10: { sorter: false},
11: { sorter: false}
0: { sorter: 'false'},
8: { sorter: 'false'},
9: { sorter: 'false'},
10: { sorter: 'false'},
11: { sorter: 'false'},
12: { sorter: 'false'}
}
});
}

View File

@@ -22,8 +22,8 @@ function init_table_sorting()
sortList: [[1,0]],
headers:
{
0: { sorter: false},
5: { sorter: false}
0: { sorter: 'false'},
5: { sorter: 'false'}
}
});

View File

@@ -184,10 +184,12 @@ function init_table_sorting()
dateFormat: '<?php echo dateformat_jquery($this->config->item('dateformat')); ?>',
headers:
{
0: { sorter: false},
0: { sorter: 'false'},
7: { sorter: 'false'},
8: { sorter: 'invoice_number'},
9: { sorter: 'false'}
9: { sorter: 'false'},
10: { sorter: 'false'},
11: { sorter: 'false'}
},
widgets: ['staticRow']
});

View File

@@ -21,8 +21,8 @@ function init_table_sorting()
sortList: [[1,0]],
headers:
{
0: { sorter: false},
6: { sorter: false}
0: { sorter: 'false'},
8: { sorter: 'false'}
}
});

View File

@@ -89,8 +89,8 @@ sales_sale_time,Zeit,Datum,Hora,Time,Time,Time,Time,เวลา,Saat,Waktu
sales_select_customer,Wähle Kunde (optional),Selecteer Klant (Optioneel),Seleccionar Cliente (Opcional),Select Customer (Optional),Choisir Client (Facultatif),選擇客戶 (Optional),Выберите клиента (необязательно),เลือกลูกค้า (Optional),Müşteri Seç (İsteğe Bağlı),Pilih Pelanggan (Opsional)
sales_send_invoice,Sende Rechnung,Vestuur Factuur,Enviar Factura,Send Invoice,Send Invoice,Send Invoice,Send Invoice,ส่งใบแจ้งหนี้,Send Invoice,Send Invoice
sales_serial,Seriennummer,Nummer,Serial,Serial,Serie,序號,серийный номер,Serial,Seri,Serial
sales_show_invoice,Rechnung,factuur,factura,invoice,invoice,invoice,invoice,ใบแจ้งหนี้,invoice,invoice
sales_show_receipt,Quittung,ticket,recibo,receipt,receipt,receipt,receipt,ใบเสร็จ,receipt,receipt
sales_show_invoice,Rechnung,Factuur,Factura,Show Invoice,Show Invoice,Show Invoice,Show Invoice,ใบแจ้งหนี้,Show Invoice,Show Invoice
sales_show_receipt,Quittung,Ticket,Recibo,Show Receipt,Show Receipt,Show Receipt,Show Receipt,ใบเสร็จ,Show Receipt,Show Receipt
sales_start_typing_customer_name,Geben Sie den Kundennamen ein...,Typ naam klant...,Empieza a escribir el cliente...,Start Typing customer's name...,Commencez à saisir le nom du client...,開始輸入客戶的名字,Начните печатать название клиента...,เริ่มต้นพิมพ์ชื่อลูกค้า...,Müşteri Adı...,Ketik Nama Pelanggan...
sales_start_typing_item_name,Geben Sie den Artikel ein oder scannen Sie ihn...,Typ naam product of barcode...,Empieza a escribir o escanea el código de barras...,Start Typing item's name or scan barcode...,Commencez à saisir le nom de l\'item ou scannez le code-barre...,開始輸入產品名或掃描條碼...,Начните печатать название товара или сканировайте штрих-кода...,เริ่มต้นพิมพ์ชื่อสินค้า หรือ สแกนบาร์โค๊ด...,Ürün adı yazın yada barkod okutun...,Ketik Nama Barang atau Scan Barcode...
sales_stock_location,Lagerort,Stock locatie,Inventario,Stock location,,,,ที่เก็บ,Stok yeri,Lokasi Stock
1 label de-CH nl-BE es en fr zh ru th tr id
89 sales_select_customer Wähle Kunde (optional) Selecteer Klant (Optioneel) Seleccionar Cliente (Opcional) Select Customer (Optional) Choisir Client (Facultatif) 選擇客戶 (Optional) Выберите клиента (необязательно) เลือกลูกค้า (Optional) Müşteri Seç (İsteğe Bağlı) Pilih Pelanggan (Opsional)
90 sales_send_invoice Sende Rechnung Vestuur Factuur Enviar Factura Send Invoice Send Invoice Send Invoice Send Invoice ส่งใบแจ้งหนี้ Send Invoice Send Invoice
91 sales_serial Seriennummer Nummer Serial Serial Serie 序號 серийный номер Serial Seri Serial
92 sales_show_invoice Rechnung factuur Factuur factura Factura invoice Show Invoice invoice Show Invoice invoice Show Invoice invoice Show Invoice ใบแจ้งหนี้ invoice Show Invoice invoice Show Invoice
93 sales_show_receipt Quittung ticket Ticket recibo Recibo receipt Show Receipt receipt Show Receipt receipt Show Receipt receipt Show Receipt ใบเสร็จ receipt Show Receipt receipt Show Receipt
94 sales_start_typing_customer_name Geben Sie den Kundennamen ein... Typ naam klant... Empieza a escribir el cliente... Start Typing customer's name... Commencez à saisir le nom du client... 開始輸入客戶的名字 Начните печатать название клиента... เริ่มต้นพิมพ์ชื่อลูกค้า... Müşteri Adı... Ketik Nama Pelanggan...
95 sales_start_typing_item_name Geben Sie den Artikel ein oder scannen Sie ihn... Typ naam product of barcode... Empieza a escribir o escanea el código de barras... Start Typing item's name or scan barcode... Commencez à saisir le nom de l\'item ou scannez le code-barre... 開始輸入產品名或掃描條碼... Начните печатать название товара или сканировайте штрих-кода... เริ่มต้นพิมพ์ชื่อสินค้า หรือ สแกนบาร์โค๊ด... Ürün adı yazın yada barkod okutun... Ketik Nama Barang atau Scan Barcode...
96 sales_stock_location Lagerort Stock locatie Inventario Stock location ที่เก็บ Stok yeri Lokasi Stock