N°1386 - Advanced Search: Navigation in list - Browse this list - back from run_query

This commit is contained in:
acognet
2023-05-25 16:07:15 +02:00
parent 9ebcbf2459
commit b852e72088
15 changed files with 132 additions and 44 deletions

View File

@@ -0,0 +1,48 @@
<?php
/**
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\UI\Base\Component\DataTable;
use ApplicationContext;
use Combodo\iTop\Application\UI\Base\Layout\UIContentBlock;
use Combodo\iTop\Application\UI\Base\tJSRefreshCallback;
use DataTableConfig;
/**
* Class DataTableBasket
*
* @package Combodo\iTop\Application\UI\Base\Component\DataTableBasket
* @since 3.1.0
*/
class DataTableBasket extends UIContentBlock
{
// Overloaded constants
public const BLOCK_CODE = 'ibo-datatable-basket';
public const DEFAULT_JS_ON_READY_TEMPLATE_REL_PATH = 'base/components/datatable/basket';
protected $sPostedFieldsForBackUrl;
/**
* Panel constructor.
*
*/
public function __construct(array $aPostedFieldsForBackUrl = [], ?string $sId = null)
{
parent::__construct($sId);
$this->sPostedFieldsForBackUrl = json_encode($aPostedFieldsForBackUrl);
}
/**
* @return string
*/
public function GetPostedFieldsForBackUrl(): string
{
return $this->sPostedFieldsForBackUrl;
}
}

View File

@@ -899,10 +899,18 @@ JS;
return $oTable;
}
public static function MakeParamForBasket(array $aPostedFields)
{
$oBlock = new DataTableBasket($aPostedFields);
return $oBlock;
}
/**
* @return array
*/
public static function GetAllowedParams(): array
public
static function GetAllowedParams(): array
{
return [
'surround_with_panel',
@@ -953,4 +961,5 @@ JS;
/** Don't provide the standard object creation feature */
];
}
}