Skip to content

Commit

Permalink
refactor workspace "show panel" vars names
Browse files Browse the repository at this point in the history
indicate the view it belongs to in order to welcome new nestable media panels
  • Loading branch information
vincent-peugnet committed Nov 1, 2024
1 parent 18c0212 commit 9ed1f83
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions app/class/Workspace.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ class Workspace extends Item
{
protected bool $showeditorleftpanel = true;
protected bool $showeditorrightpanel = false;
protected bool $showeoptionspanel = false;
protected bool $showebookmarkspanel = true;
protected bool $showhomeoptionspanel = false;
protected bool $showhomebookmarkspanel = true;

protected int $fontsize = 15;
protected string $mediadisplay = self::LIST;
Expand Down Expand Up @@ -43,14 +43,14 @@ public function showeditorrightpanel(): bool
return $this->showeditorrightpanel;
}

public function showeoptionspanel(): bool
public function showhomeoptionspanel(): bool
{
return $this->showeoptionspanel;
return $this->showhomeoptionspanel;
}

public function showebookmarkspanel(): bool
public function showhomebookmarkspanel(): bool
{
return $this->showebookmarkspanel;
return $this->showhomebookmarkspanel;
}

public function fontsize(): int
Expand Down Expand Up @@ -78,14 +78,14 @@ public function setshoweditorrightpanel($show): void
$this->showeditorrightpanel = boolval($show);
}

public function setshoweoptionspanel($show): void
public function setshowhomeoptionspanel($show): void
{
$this->showeoptionspanel = boolval($show);
$this->showhomeoptionspanel = boolval($show);
}

public function setshowebookmarkspanel($show): void
public function setshowhomebookmarkspanel($show): void
{
$this->showebookmarkspanel = boolval($show);
$this->showhomebookmarkspanel = boolval($show);
}

public function setfontsize($fontsize): void
Expand Down
4 changes: 2 additions & 2 deletions app/view/templates/homebookmark.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<aside id="bookmarks" class="toggle-panel-container">
<input id="showebookmarkspanel" name="showebookmarkspanel" value="1" class="toggle-panel-toggle" type="checkbox" form="workspace-form" <?= $workspace->showebookmarkspanel() === true ? 'checked' : '' ?>>
<label for="showebookmarkspanel" class="toggle-panel-label"><span><i class="fa fa-bookmark"></i></span></label>
<input id="showhomebookmarkspanel" name="showhomebookmarkspanel" value="1" class="toggle-panel-toggle" type="checkbox" form="workspace-form" <?= $workspace->showhomebookmarkspanel() === true ? 'checked' : '' ?>>
<label for="showhomebookmarkspanel" class="toggle-panel-label"><span><i class="fa fa-bookmark"></i></span></label>

<div class="toggle-panel" id="optionspanel">
<h2>Bookmarks</h2>
Expand Down
4 changes: 2 additions & 2 deletions app/view/templates/homemenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@
method="post"
data-api="<?= $this->url('apiworkspaceupdate') ?>"
id="workspace-form" >
<input type="hidden" name="showeoptionspanel" value="0">
<input type="hidden" name="showebookmarkspanel" value="0">
<input type="hidden" name="showhomeoptionspanel" value="0">
<input type="hidden" name="showhomebookmarkspanel" value="0">
<button type="submit">
<i class="fa fa-edit"></i>
<span class="text">save workspace</span>
Expand Down
4 changes: 2 additions & 2 deletions app/view/templates/homeopt.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<aside id="filter" class="toggle-panel-container">

<input id="showeoptionspanel" name="showeoptionspanel" value="1" class="toggle-panel-toggle" type="checkbox" form="workspace-form" <?= $workspace->showeoptionspanel() === true ? 'checked' : '' ?>>
<label for="showeoptionspanel" class="toggle-panel-label"><span><i class="fa fa-filter"></i></span></label>
<input id="showhomeoptionspanel" name="showhomeoptionspanel" value="1" class="toggle-panel-toggle" type="checkbox" form="workspace-form" <?= $workspace->showhomeoptionspanel() === true ? 'checked' : '' ?>>
<label for="showhomeoptionspanel" class="toggle-panel-label"><span><i class="fa fa-filter"></i></span></label>

<div class="toggle-panel" id="optionspanel">
<h2>Filters</h2>
Expand Down
8 changes: 4 additions & 4 deletions app/view/templates/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<main class="media">

<aside id="media" class="toggle-panel-container">
<input id="showemediapanel" name="showemediapanel" value="1" class="toggle-panel-toggle" type="checkbox" form="workspace-form" checked>
<label for="showemediapanel" class="toggle-panel-label"><span><i class="fa fa-folder"></i></span></label>
<input id="showmediatreepanel" name="showmediatreepanel" value="1" class="toggle-panel-toggle" type="checkbox" form="workspace-form" checked>
<label for="showmediatreepanel" class="toggle-panel-label"><span><i class="fa fa-folder"></i></span></label>
<div class="toggle-panel" id="mediapanel">
<h2>Explorer</h2>
<div class="toggle-panel-content">
Expand All @@ -23,8 +23,8 @@

<aside id="filter" class="toggle-panel-container">

<input id="showeoptionspanel" name="showeoptionspanel" value="1" class="toggle-panel-toggle" type="checkbox" form="workspace-form" >
<label for="showeoptionspanel" class="toggle-panel-label"><span><i class="fa fa-filter"></i></span></label>
<input id="showmediaoptionspanel" name="showmediaoptionspanel" value="1" class="toggle-panel-toggle" type="checkbox" form="workspace-form" >
<label for="showmediaoptionspanel" class="toggle-panel-label"><span><i class="fa fa-filter"></i></span></label>

<div class="toggle-panel" id="optionspanel">
<h2>Filters</h2>
Expand Down

0 comments on commit 9ed1f83

Please sign in to comment.