|
|
@@ -390,18 +390,17 @@ frappe.views.Workspace = class Workspace { |
|
|
|
|
|
|
|
this.clear_page_actions(); |
|
|
|
|
|
|
|
current_page.is_editable && |
|
|
|
this.page.set_secondary_action(__("Edit"), async () => { |
|
|
|
if (!this.editor || !this.editor.readOnly) return; |
|
|
|
this.is_read_only = false; |
|
|
|
await this.editor.readOnly.toggle(); |
|
|
|
this.editor.isReady.then(() => { |
|
|
|
this.initialize_editorjs_undo(); |
|
|
|
this.setup_customization_buttons(current_page); |
|
|
|
this.show_sidebar_actions(); |
|
|
|
this.make_blocks_sortable(); |
|
|
|
}); |
|
|
|
this.page.set_secondary_action(__("Edit"), async () => { |
|
|
|
if (!this.editor || !this.editor.readOnly) return; |
|
|
|
this.is_read_only = false; |
|
|
|
await this.editor.readOnly.toggle(); |
|
|
|
this.editor.isReady.then(() => { |
|
|
|
this.initialize_editorjs_undo(); |
|
|
|
this.setup_customization_buttons(current_page); |
|
|
|
this.show_sidebar_actions(); |
|
|
|
this.make_blocks_sortable(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
this.page.add_inner_button(__("Create Workspace"), () => { |
|
|
|
this.initialize_new_page(); |
|
|
|