mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-02-18 14:48:42 -05:00
Fix suggestions for item kits (by name and KIT id) (#328)
This commit is contained in:
@@ -39,7 +39,7 @@ class Giftcards extends Secure_area implements iData_controller
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
function suggest_search()
|
||||
{
|
||||
$suggestions = $this->Giftcard->get_search_suggestions($this->input->post('term'));
|
||||
echo json_encode($suggestions);
|
||||
|
||||
@@ -68,12 +68,9 @@ class Item_kits extends Secure_area implements iData_controller
|
||||
echo json_encode(array('total_rows' => $total_rows, 'rows' => $data_rows, 'pagination' => $links));
|
||||
}
|
||||
|
||||
/*
|
||||
Gives search suggestions based on what is being searched for
|
||||
*/
|
||||
function suggest()
|
||||
function suggest_search()
|
||||
{
|
||||
$suggestions = $this->Item_kit->get_search_suggestions($this->input->post('term'), TRUE);
|
||||
$suggestions = $this->Item_kit->get_search_suggestions($this->input->post('term'));
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ interface iData_controller
|
||||
{
|
||||
public function index();
|
||||
public function search();
|
||||
public function suggest();
|
||||
public function suggest_search();
|
||||
public function get_row();
|
||||
public function view($data_item_id=-1);
|
||||
public function save($data_item_id=-1);
|
||||
|
||||
@@ -6,7 +6,7 @@ $(document).ready(function()
|
||||
enable_select_all();
|
||||
enable_checkboxes();
|
||||
enable_row_selection();
|
||||
enable_search({suggest_url: '<?php echo site_url("$controller_name/suggest")?>',
|
||||
enable_search({suggest_url: '<?php echo site_url("$controller_name/suggest_search")?>',
|
||||
confirm_message: '<?php echo $this->lang->line("common_confirm_search")?>'});
|
||||
enable_delete('<?php echo $this->lang->line($controller_name."_confirm_delete")?>','<?php echo $this->lang->line($controller_name."_none_selected")?>');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user