Merge pull request #20346 from shariquerik/workspace-sidebar-fix
This commit is contained in:
commit
423c0a2e36
1 changed files with 9 additions and 6 deletions
|
|
@ -157,7 +157,10 @@ frappe.views.Workspace = class Workspace {
|
|||
sidebar_section.addClass("hidden");
|
||||
}
|
||||
|
||||
if (sidebar_section.find("> [item-is-hidden='0']").length == 0) {
|
||||
if (
|
||||
sidebar_section.find("sidebar-item-container").length &&
|
||||
sidebar_section.find("> [item-is-hidden='0']").length == 0
|
||||
) {
|
||||
sidebar_section.addClass("hidden show-in-edit-mode");
|
||||
}
|
||||
}
|
||||
|
|
@ -1445,15 +1448,15 @@ frappe.views.Workspace = class Workspace {
|
|||
}
|
||||
|
||||
create_sidebar_skeleton() {
|
||||
if (this.sidebar.find(".workspace-sidebar-skeleton").length) return;
|
||||
if ($(".workspace-sidebar-skeleton").length) return;
|
||||
|
||||
this.sidebar.prepend(frappe.render_template("workspace_sidebar_loading_skeleton"));
|
||||
this.sidebar.find(".standard-sidebar-section").addClass("hidden");
|
||||
$(frappe.render_template("workspace_sidebar_loading_skeleton")).insertBefore(this.sidebar);
|
||||
this.sidebar.addClass("hidden");
|
||||
}
|
||||
|
||||
remove_sidebar_skeleton() {
|
||||
this.sidebar.find(".standard-sidebar-section").removeClass("hidden");
|
||||
this.sidebar.find(".workspace-sidebar-skeleton").remove();
|
||||
this.sidebar.removeClass("hidden");
|
||||
$(".workspace-sidebar-skeleton").remove();
|
||||
}
|
||||
|
||||
register_awesomebar_shortcut() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue