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:
Harald Bamberger
2022-06-24 19:26:37 +02:00
parent 147ab92bae
commit 47f7c03075
18 changed files with 1056 additions and 4 deletions
@@ -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');
}
}
+1 -1
View File
@@ -191,7 +191,7 @@ class SearchBarLib
/**
*
*/
private function raum($searchstr, $type)
private function _raum($searchstr, $type)
{
return array();
}
@@ -0,0 +1,60 @@
<?php
$includesArray = array(
'title' => 'Test Search',
'jquery3' => true,
'bootstrap5' => true,
'fontawesome6' => true,
'tablesorter2' => true,
'vue3' => true,
'ajaxlib' => true,
'jqueryui1' => true,
'filtercomponent' => true,
'navigationcomponent' => true,
'phrases' => array(
'global' => array('mailAnXversandt'),
'ui' => array('bitteEintragWaehlen')
),
'customCSSs' => array(
'public/css/components/verticalsplit.css',
'public/css/components/searchbar.css',
),
'customJSs' => array('vendor/axios/axios/axios.min.js'),
'customJSModules' => array('public/js/apps/TestSearch.js')
);
$this->load->view('templates/FHC-Header', $includesArray);
?>
<div id="main">
<!-- Navigation component -->
<core-navigation-cmpt :add-side-menu-entries="appSideMenuEntries"></core-navigation-cmpt>
<div id="content">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">
Test Search
</h3>
</div>
</div>
<div>
<searchbar :searchoptions="searchbaroptions" :searchfunction="searchfunction"></searchbar>
<verticalsplit>
<template #top>
<searchbar :searchoptions="searchbaroptions" :searchfunction="searchfunctiondummy"></searchbar>
</template>
<template #bottom>
<!-- Filter component -->
<core-filter-cmpt filter-type="LogsViewer" @nw-new-entry="newSideMenuEntryHandler"></core-filter-cmpt>
</template>
</verticalsplit>
</div>
</div>
</div>
<?php $this->load->view('templates/FHC-Footer', $includesArray); ?>