fix: Revert back to text buttons
This commit is contained in:
parent
5f5f0e8bba
commit
86afd15100
1 changed files with 15 additions and 10 deletions
|
|
@ -15,21 +15,21 @@ class PrintFormatBuilder {
|
|||
this.page.set_primary_action(__("Save"), () => {
|
||||
this.$component.$store.save_changes();
|
||||
});
|
||||
let $toggle_preview_btn = this.page.add_action_icon(
|
||||
"printer",
|
||||
() => this.$component.toggle_preview(),
|
||||
"",
|
||||
__("Toggle Preview")
|
||||
let $toggle_preview_btn = this.page.add_button(
|
||||
__("Show Preview"),
|
||||
() => {
|
||||
this.$component.toggle_preview();
|
||||
}
|
||||
);
|
||||
this.page.add_action_icon(
|
||||
"refresh",
|
||||
() => this.$component.$store.reset_changes(),
|
||||
"",
|
||||
__("Reset Changes")
|
||||
this.page.add_button(__("Reset Changes"), () =>
|
||||
this.$component.$store.reset_changes()
|
||||
);
|
||||
this.page.add_menu_item(__("Edit Print Format"), () => {
|
||||
frappe.set_route("Form", "Print Format", this.print_format);
|
||||
});
|
||||
this.page.add_menu_item(__("Change Print Format"), () => {
|
||||
frappe.set_route("print-format-builder-beta");
|
||||
});
|
||||
|
||||
let $vm = new Vue({
|
||||
el: this.$wrapper.get(0),
|
||||
|
|
@ -51,6 +51,11 @@ class PrintFormatBuilder {
|
|||
$toggle_preview_btn.show();
|
||||
}
|
||||
});
|
||||
this.$component.$watch("show_preview", value => {
|
||||
$toggle_preview_btn.text(
|
||||
value ? __("Hide Preview") : __("Show Preview")
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue