Skip to content

Commit e6e0bc3

Browse files
committed
fix: fix scroll and collapse of sidebar menu groups
1 parent 5809998 commit e6e0bc3

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

wiki/public/js/render_wiki.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function setSortable() {
88
pull: ["qux"],
99
},
1010
swapThreshold: 0.7,
11-
filter: ".disabled",
11+
filter: ["draggable", "true"],
1212
onEnd: function (e) {
1313
frappe.utils.debounce(() => {
1414
frappe.call({
@@ -48,7 +48,7 @@ function toggleEditor() {
4848
$(".wiki-footer").toggleClass("hide");
4949
$(".page-toc").toggleClass("hide");
5050
$(".remove-sidebar-item").toggleClass("hide");
51-
$(".sidebar-item, .sidebar-group").toggleClass("disabled");
51+
$(".sidebar-item, .sidebar-group").attr("draggable", "true");
5252
$(".drop-icon").toggleClass("hide");
5353
$(".add-sidebar-page").toggleClass("hide");
5454
$(".add-sidebar-group, .sidebar-view-mode-btn").toggleClass("hide");
@@ -237,7 +237,7 @@ window.RenderWiki = class RenderWiki extends Wiki {
237237
}
238238

239239
set_edit_mode() {
240-
$(".sidebar-item, .sidebar-group").addClass("disabled");
240+
// $(".sidebar-item, .sidebar-group").addClass("disxabled");
241241

242242
$(".web-sidebar ul").each(setSortable);
243243

@@ -264,7 +264,7 @@ window.RenderWiki = class RenderWiki extends Wiki {
264264

265265
// switch to edit mode
266266
toggleEditor();
267-
$("html").css({ overflow: "hidden" });
267+
// $("html").css({ overflow: "auto" });
268268

269269
if (!urlParams.get("editWiki")) set_search_params("editWiki", "1");
270270
}

wiki/public/scss/wiki.scss

-18
Original file line numberDiff line numberDiff line change
@@ -889,24 +889,6 @@ h6:hover .feather-link {
889889
}
890890
}
891891

892-
.menu {
893-
cursor: pointer;
894-
font-size: 24px;
895-
896-
.dots {
897-
display: flex;
898-
justify-content: space-around;
899-
width: 16px;
900-
901-
.dot {
902-
background-color: #333;
903-
border-radius: 50%;
904-
width: 6px;
905-
height: 6px;
906-
}
907-
}
908-
}
909-
910892
.wiki-options:hover {
911893
background-color: var(--gray-200);
912894
border-radius: 5px;

0 commit comments

Comments
 (0)