Просмотр исходного кода

fix: always show edit button

(cherry picked from commit f00cf1e290)
version-14
Shariq Ansari 2 лет назад
committed by Mergify
Родитель
Сommit
2c5bc44a0f
1 измененных файлов: 10 добавлений и 11 удалений
  1. +10
    -11
      frappe/public/js/frappe/views/workspace/workspace.js

+ 10
- 11
frappe/public/js/frappe/views/workspace/workspace.js Просмотреть файл

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


Загрузка…
Отмена
Сохранить