fix: remove other options for creation
This commit is contained in:
parent
4ee7c9a54c
commit
9c2b2f97aa
3 changed files with 0 additions and 30 deletions
|
|
@ -322,7 +322,6 @@ def create_user_icons(user, data):
|
|||
return data
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def add_workspace_to_desktop(workspace):
|
||||
sidebar = frappe.new_doc("Workspace Sidebar")
|
||||
sidebar_item = frappe.new_doc("Workspace Sidebar Item")
|
||||
|
|
|
|||
|
|
@ -8,25 +8,6 @@ frappe.ui.form.on("Workspace", {
|
|||
|
||||
refresh: function (frm) {
|
||||
frm.enable_save();
|
||||
if (frappe.app.sidebar.get_workspace_sidebars(frm.doc.title).length === 0) {
|
||||
frm.add_custom_button(__("Add to Desktop"), function () {
|
||||
frappe.call({
|
||||
method: "frappe.desk.doctype.desktop_icon.desktop_icon.add_workspace_to_desktop",
|
||||
args: {
|
||||
workspace: frm.doc.name,
|
||||
},
|
||||
callback: function (r) {
|
||||
if (r.message) {
|
||||
frappe.boot.desktop_icons.push(r.message.icon);
|
||||
frappe.toast({
|
||||
message: __("Workspace added to desktop"),
|
||||
indicator: "green",
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
let url = `/desk/${
|
||||
frm.doc.public
|
||||
|
|
|
|||
|
|
@ -245,16 +245,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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue