* [ADD] Added URI signature for JS and CSS resources

* [MOD] Improved requests handling. It makes them more testing friendly
* [MOD] Code refactoring
This commit is contained in:
nuxsmin
2018-07-08 23:05:30 +02:00
parent 53a2552c05
commit a97b92131f
63 changed files with 914 additions and 618 deletions

View File

@@ -31,7 +31,6 @@ use SP\Core\Events\EventMessage;
use SP\Core\Exceptions\ValidationException;
use SP\DataModel\ClientData;
use SP\Http\JsonResponse;
use SP\Http\Request;
use SP\Modules\Web\Controllers\Helpers\ItemsGridHelper;
use SP\Modules\Web\Controllers\Traits\ItemTrait;
use SP\Modules\Web\Controllers\Traits\JsonTrait;
@@ -66,7 +65,7 @@ class ClientController extends ControllerBase implements CrudControllerInterface
}
$this->view->addTemplate('datagrid-table', 'grid');
$this->view->assign('index', Request::analyzeInt('activetab', 0));
$this->view->assign('index', $this->request->analyzeInt('activetab', 0));
$this->view->assign('data', $this->getSearchGrid());
$this->returnJsonResponseData(['html' => $this->render()]);
@@ -82,7 +81,7 @@ class ClientController extends ControllerBase implements CrudControllerInterface
protected function getSearchGrid()
{
$itemsGridHelper = $this->dic->get(ItemsGridHelper::class);
$itemSearchData = $this->getSearchData($this->configData->getAccountCount());
$itemSearchData = $this->getSearchData($this->configData->getAccountCount(), $this->request);
return $itemsGridHelper->updatePager($itemsGridHelper->getClientsGrid($this->clientService->search($itemSearchData)), $itemSearchData);
}
@@ -193,7 +192,7 @@ class ClientController extends ControllerBase implements CrudControllerInterface
try {
if ($id === null) {
$this->clientService->deleteByIdBatch($this->getItemsIdFromRequest());
$this->clientService->deleteByIdBatch($this->getItemsIdFromRequest($this->request));
$this->deleteCustomFieldsForItem(Acl::CLIENT, $id);