Skip to content

Commit

Permalink
Merge pull request #482 from vincent-peugnet/workspace-menu-in-hbar-s…
Browse files Browse the repository at this point in the history
…ection

Workspace menu is always in hbar-section, fix #480
  • Loading branch information
jbidoret authored Nov 2, 2024
2 parents 84872a3 + a9aa9f8 commit c9b0c1b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
3 changes: 3 additions & 0 deletions app/view/templates/homemenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,9 @@
<?php endif ?>
</div>
</details>
</div>

<div class="hbar-section">

<div id="save-workspace">
<form
Expand Down
3 changes: 3 additions & 0 deletions app/view/templates/mediamenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@
</form>
</div>
</details>
</div>

<div class="hbar-section">

<div id="save-workspace">
<form
Expand Down
9 changes: 0 additions & 9 deletions assets/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ topbar
navbar
toggle panels (collapsibles)
delete
workspace button (no-js)
media queries
flash messages
Expand Down Expand Up @@ -492,14 +491,6 @@ input.toggle-panel-toggle {
padding: var(--spacing);
}

/* --------------------------------------------------------- workspace button (no-js) */
#save-workspace {
position: absolute;
right: var(--spacing);
}
.js #save-workspace {
display: none;
}
/* --------------------------------------------------------- media queries */


Expand Down
8 changes: 3 additions & 5 deletions src/fn/fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,9 @@ export function initWorkspaceForm() {
for (const input of inputs) {
input.oninput = workspaceChanged;
}
let submits = form.querySelectorAll('[type="submit"]');
for (const submit of submits) {
if (submit instanceof HTMLElement) {
submit.style.display = 'none';
}
let saveworkspace = document.getElementById('save-workspace');
if (saveworkspace instanceof HTMLElement) {
saveworkspace.style.display = 'none';
}

form.addEventListener('submit', function(event) {
Expand Down

0 comments on commit c9b0c1b

Please sign in to comment.