From b6bfe76e1bf2b45e29b33cd1093ac5d5cfa2a1b7 Mon Sep 17 00:00:00 2001 From: Nihantra Patel Date: Thu, 25 Apr 2024 15:10:34 +0530 Subject: [PATCH 01/92] feat: add multiple buttons (dropdown) in listview row --- frappe/public/js/frappe/list/list_view.js | 69 +++++++++++++++++++++-- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index 9ba14a0ec7..86ea268cc0 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -315,6 +315,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { this.update_checkbox(); this.update_url_with_filters(); this.setup_realtime_updates(); + this.apply_styles_basedon_dropdown(); }); } @@ -915,8 +916,10 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { get_meta_html(doc) { let html = ""; + let settings_button = ""; + let button_section = ""; + const dropdown_button = this.generate_dropdown_html(doc); - let settings_button = null; if (this.settings.button && this.settings.button.show(doc)) { settings_button = ` @@ -929,6 +932,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { `; } + button_section = settings_button + dropdown_button; const modified = comment_when(doc.modified, true); let assigned_to = ``; @@ -950,13 +954,13 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { html += `