showmore peut être configuré pour afficher
This commit is contained in:
parent
d65d5fa0b7
commit
bb4f202adc
@ -49,6 +49,13 @@ class showmorePlugin extends BasePlugin {
|
|||||||
|
|
||||||
protected ?string $onShow;
|
protected ?string $onShow;
|
||||||
|
|
||||||
|
protected bool $initialShow = false;
|
||||||
|
|
||||||
|
function show(bool $show=true): self {
|
||||||
|
$this->initialShow = $show;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
function startc(): array {
|
function startc(): array {
|
||||||
return v::sdiv(["class" => $this->containerClass]);
|
return v::sdiv(["class" => $this->containerClass]);
|
||||||
}
|
}
|
||||||
@ -56,7 +63,10 @@ class showmorePlugin extends BasePlugin {
|
|||||||
function invite($vs=null): array {
|
function invite($vs=null): array {
|
||||||
$vs ??= $this->inviteContent;
|
$vs ??= $this->inviteContent;
|
||||||
return v::a([
|
return v::a([
|
||||||
"class" => $this->inviteClass,
|
"class" => [
|
||||||
|
$this->inviteClass,
|
||||||
|
"hidden" => $this->initialShow,
|
||||||
|
],
|
||||||
"href" => "#",
|
"href" => "#",
|
||||||
$vs,
|
$vs,
|
||||||
]);
|
]);
|
||||||
@ -64,7 +74,10 @@ class showmorePlugin extends BasePlugin {
|
|||||||
|
|
||||||
function startp(): array {
|
function startp(): array {
|
||||||
return v::sdiv([
|
return v::sdiv([
|
||||||
"class" => [$this->panelClass, "hidden"],
|
"class" => [
|
||||||
|
$this->panelClass,
|
||||||
|
"hidden" => !$this->initialShow,
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user