Przeglądaj źródła

fix: always show edit button

(cherry picked from commit f00cf1e290)
version-14
Shariq Ansari 2 lat temu
committed by Mergify
rodzic
commit
2c5bc44a0f
1 zmienionych plików z 10 dodań i 11 usunięć
  1. +10
    -11
      frappe/public/js/frappe/views/workspace/workspace.js

+ 10
- 11
frappe/public/js/frappe/views/workspace/workspace.js Wyświetl plik

@@ -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();


Ładowanie…
Anuluj
Zapisz