Merge pull request #37157 from sokumon/awesomebar

fix(desktop): call setup once
This commit is contained in:
Soham Kulkarni 2026-02-18 11:44:42 +05:30 committed by GitHub
commit 46d56e1f52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 18 deletions

View file

@ -174,8 +174,6 @@ class DesktopPage {
this.page = page;
this.edit_mode = false;
this.desktop_menu_items = [];
this.make(this.page);
this.setup();
}
update() {
this.make(this.page);

View file

@ -55,13 +55,9 @@ frappe.ui.Notifications = class Notifications {
.on("click", (e) => {
if (this.full_height) {
this.dropdown.addClass("hidden");
} else {
this.dropdown_list.addClass("hidden");
}
})
.appendTo(this.header_actions)
.attr("title", __("Close"))
.tooltip({ delay: { show: 600, hide: 100 }, trigger: "hover" });
.appendTo(this.header_actions);
this.categories = [
{

View file

@ -222,7 +222,8 @@ frappe.views.Workspace = class Workspace {
route: "#",
});
if (!this.add_workspace_controls) {
let workspace_actions_button = this.page.add_action_icon("ellipsis");
let workspace_actions_button = this.page.add_action_icon("ellipsis", "", "");
$(workspace_actions_button).removeAttr("data-original-title");
$(workspace_actions_button).removeClass("btn-default");
frappe.ui.create_menu({
parent: $(workspace_actions_button),
@ -245,16 +246,6 @@ frappe.views.Workspace = class Workspace {
return current_page.is_editable;
},
},
{
label: "New",
icon: "plus",
onClick: function () {
me.initialize_new_page(true);
},
condition: () => {
return me.has_create_access;
},
},
],
});
this.add_workspace_controls = true;