Merge pull request #15435 from karthikeyan5/develop-fix-mobile-print-page-menu
fix(print page): additional menu in mobile view print page
This commit is contained in:
commit
b3cacdf40d
2 changed files with 8 additions and 3 deletions
|
|
@ -52,8 +52,8 @@ frappe.ui.form.PrintView = class {
|
|||
':Print Settings',
|
||||
'Print Settings'
|
||||
);
|
||||
this.setup_toolbar();
|
||||
this.setup_menu();
|
||||
this.setup_toolbar();
|
||||
this.setup_sidebar();
|
||||
this.setup_keyboard_shortcuts();
|
||||
}
|
||||
|
|
@ -81,8 +81,9 @@ frappe.ui.form.PrintView = class {
|
|||
);
|
||||
|
||||
this.page.add_button(
|
||||
frappe.utils.icon('refresh'),
|
||||
() => this.refresh_print_format()
|
||||
__('Refresh'),
|
||||
() => this.refresh_print_format(),
|
||||
{ icon: 'refresh' }
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -714,6 +714,10 @@ frappe.ui.Page = class Page {
|
|||
${opts.icon ? frappe.utils.icon(opts.icon): ''}
|
||||
${label}
|
||||
</button>`);
|
||||
// Add actions as menu item in Mobile View (similar to "add_custom_button" in forms.js)
|
||||
let menu_item = this.add_menu_item(label, click, false);
|
||||
menu_item.parent().addClass("hidden-xl");
|
||||
|
||||
button.appendTo(this.custom_actions);
|
||||
button.on('click', click);
|
||||
this.custom_actions.removeClass('hide');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue