mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 10:22:18 +00:00
virtualsplit and searchbar vue component, TestSearch Controller and View for Demonstration, minor change to SearchBar Controller to work with posted json
This commit is contained in:
@@ -34,8 +34,12 @@ class SearchBar extends FHC_Controller
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
$searchstr = $this->input->post(self::SEARCHSTR_PARAM);
|
||||
$types = $this->input->post(self::TYPES_PARAM);
|
||||
//$searchstr = $this->input->post(self::SEARCHSTR_PARAM);
|
||||
//$types = $this->input->post(self::TYPES_PARAM);
|
||||
|
||||
$json = json_decode($this->input->raw_input_stream, true);
|
||||
$searchstr = $json[self::SEARCHSTR_PARAM];
|
||||
$types = $json[self::TYPES_PARAM];
|
||||
|
||||
$this->outputJson($this->searchbarlib->search($searchstr, $types));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Test Search Vue Component
|
||||
*/
|
||||
class TestSearch extends Auth_Controller
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'index' => 'system/developer:r'
|
||||
)
|
||||
);
|
||||
|
||||
// Loads WidgetLib
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
// Loads phrases system
|
||||
$this->loadPhrases(
|
||||
array(
|
||||
'global',
|
||||
'ui',
|
||||
'filter'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Everything has a beginning
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('system/logs/testSearch.php');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user