Fix suggestions for item kits (by name and KIT id) (#328)

This commit is contained in:
jekkos committed 2016-03-08 08:39:21 +01:00
1 parent a6fa6c9cd6
commit 2436cf5da5
4 files changed
+5 -8

No files matched your search

+1 -1
View File
@@ -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);
+2 -5
View File
@@ -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);
+1 -1
View File
@@ -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")?>');
});