modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2024-05-21 04:42:55 +04:00
parent 2804e1b3bb
commit b97b2b651d
2 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,8 @@
@CHARSET "utf-8";/* -*- coding: utf-8 -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 */
.dt-autodiv > div {
display: inline-block;
}
.dt-autodiv > div:not(:first-child)::before {
content: "  |  ";
}

View File

@ -1,24 +1,43 @@
<?php
namespace nur\v\bs3\vc;
use nur\A;
use nur\b\params\Tparametrable;
use nur\data\types\Metadata;
use nur\v\js;
class CDatatable extends CTable {
use Tparametrable;
const CSS = "nur-v-bs3/datatables/datatables.css";
const CSS = [
"nur-v-bs3/datatables/datatables.css",
"nur-v-bs3/datatables.css",
];
const JS = "nur-v-bs3/datatables/datatables.js";
const PARAMETRABLE_PARAMS_SCHEMA = [
"dtclass" => ["string", "datatable", "classe des tables mises en forme par Datatable"],
"dtconfig" => ["?array", ["order" => []], "configuration de l'objet"],
"dtauto" => ["?bool", "configurer la table pour que sa taille soit automatique"],
];
protected $ppDtclass;
protected $ppDtconfig;
protected $ppDtauto;
protected function afterSetParametrableParams(array $modifiedKeys, ?Metadata $md=null): void {
parent::afterSetParametrableParams($modifiedKeys, $md);
if (self::was_parametrable_param_modified($modifiedKeys, "dtauto")) {
A::merge($this->ppDtconfig, [
"dom" => "<'row'<'col-sm-12 dt-autodiv'lfi>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 dt-autodiv'p>>",
"bAutoWidth" => false,
]);
A::append($this->ppTableClass, "table-auto");
}
}
protected function getTableClass(): array {
return [$this->ppTableClass, $this->ppDtclass];
}