List view -> add custom buttons to menu

This commit is contained in:
Ponnusamy 2022-11-02 12:27:50 +05:30 committed by GitHub
parent 7bbd36345a
commit 58c262a3ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -600,6 +600,11 @@ frappe.ui.Page = class Page {
let response = action();
me.btn_disable_enable(btn, response);
};
// Add actions as menu item in Mobile View
let menu_item_label = group ? `${group} > ${label}` : label;
let menu_item = this.add_menu_item(menu_item_label, _action, false);
menu_item.parent().addClass("hidden-xl");
if (group) {
var $group = this.get_or_add_inner_group_button(group);
$(this.inner_toolbar).removeClass("hide");