Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct podfile sidebar #799

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions pod/podfile/static/podfile/js/filewidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ if (typeof loaded == "undefined") {
bsdirs.hide();
});

document.querySelectorAll("#open-folder-icon > *").forEach((el) => {
/*document.querySelectorAll("#open-folder-icon > *").forEach((el) => {
el.style = "pointer-events: none; cursor : pointer;";
});
if (document.getElementById("open-folder-icon")) {
document.getElementById("open-folder-icon").style.cursor = "pointer";
}
}*/

document.addEventListener("click", (e) => {
/*document.addEventListener("click", (e) => {
if (
e.target.id != "open-folder-icon" &&
!e.target.matches("open-folder-icon i")
Expand All @@ -141,7 +141,7 @@ if (typeof loaded == "undefined") {

e.preventDefault();
document.getElementById("dirs").classList.add("open");
});
});*/

document.addEventListener("change", (e) => {
if (e.target.id != "ufile") return;
Expand All @@ -167,7 +167,7 @@ if (typeof loaded == "undefined") {
var data_form = new FormData(e.target);

var url = e.target.getAttribute("action");

fetch(url, {
method: "POST",
body: data_form,
Expand Down Expand Up @@ -701,7 +701,7 @@ if (typeof loaded == "undefined") {
foldname =
'<span class="folder_name" id="folder-name-' +
foldid +
'"> ' +
'">' +
foldname +
"</span>";
}
Expand Down
24 changes: 14 additions & 10 deletions pod/podfile/templates/podfile/home_content.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
{% load i18n %}

<div class="container-fluid h-100" id="podfile">
<div class="open-folder p-0" id="open-folder-icon">
<button class="navbar-toggler pod-navbar__button-toggler"
type="button"
aria-controls="dirs"
aria-expanded="false"
data-bs-toggle="collapse"
data-bs-target="#dirs"
title="{% trans 'Toggle folders menu' %}">
<i class="bi bi-list" aria-hidden="true"></i>
</button>
</div>
<div class="row">
<div class="col col-4" id="dirs">
<div class="col col-4 collapse collapse-horizontal" id="dirs">
{% include 'podfile/userfolder.html' %}
</div>
<div class="open-folder p-0" id="open-folder-icon">
<button class="navbar-toggler pod-navbar__button-toggler"
aria-controls="dirs"
data-bs-target="#dirs"
title="{% trans 'Toggle folders menu' %}">
<i class="bi bi-list" aria-hidden="true"></i>
</button>
</div>
<div class="col col-8 col-md-offset-1" id="files">

<div class="col" id="files">
{% include 'podfile/list_folder_files.html' with folder=current_session_folder %}
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion pod/podfile/templates/podfile/userfolder.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
{% trans "Add new folder" %}
</button>
</div>
<button id="close-folder-icon" type="button" class="btn-close" aria-label="{% trans 'Close' %}"></button>
<button id="close-folder-icon" type="button"
class="btn-close" aria-label="{% trans 'Close' %}"></button>
</div>
<label class="visually-hidden" for="folder-search">{% trans 'Search folder' %}</label>
<input
Expand Down