From 952eb004b8169b6dfd554e8a338a044cf45046e5 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Wed, 20 Oct 2021 18:58:42 +0530 Subject: [PATCH] fix: Use icons instead of labelled buttons for consistency --- .../print_format_builder.bundle.js | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/frappe/public/js/print_format_builder/print_format_builder.bundle.js b/frappe/public/js/print_format_builder/print_format_builder.bundle.js index bedb8a1f7a..1d18a15c3f 100644 --- a/frappe/public/js/print_format_builder/print_format_builder.bundle.js +++ b/frappe/public/js/print_format_builder/print_format_builder.bundle.js @@ -8,20 +8,28 @@ class PrintFormatBuilder { this.print_format = print_format; this.page.clear_actions(); + this.page.clear_icons(); this.page.clear_custom_actions(); this.page.set_title(__("Editing {0}", [this.print_format])); - this.page.set_primary_action(__("Save changes"), () => { + this.page.set_primary_action(__("Save"), () => { this.$component.$store.save_changes(); }); - this.page.set_secondary_action(__("Reset changes"), () => { - this.$component.$store.reset_changes(); - }); - let $toggle_preview_btn = this.page.add_button( - __("Toggle Preview"), + let $toggle_preview_btn = this.page.add_action_icon( + "printer", () => this.$component.toggle_preview(), - { icon: "small-file" } + "", + __("Toggle Preview") ); + this.page.add_action_icon( + "refresh", + () => this.$component.$store.reset_changes(), + "", + __("Reset Changes") + ); + this.page.add_menu_item(__("Edit Print Format"), () => { + frappe.set_route("Form", "Print Format", this.print_format); + }); let $vm = new Vue({ el: this.$wrapper.get(0),