From 2f997cdd785d076a3b7e09bcd8aeafe90b1d360d Mon Sep 17 00:00:00 2001 From: Soufiane Date: Tue, 30 Jan 2024 14:45:36 +0100 Subject: [PATCH] Fix the loading order of the actions toolbar [SCI-9981] (#7019) --- app/assets/javascripts/reports/reports_datatable.js | 2 +- app/views/label_templates/index.html.erb | 2 +- app/views/reports/index.html.erb | 2 +- app/views/repositories/index.html.erb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/reports/reports_datatable.js b/app/assets/javascripts/reports/reports_datatable.js index 084ddab87..9661138ec 100644 --- a/app/assets/javascripts/reports/reports_datatable.js +++ b/app/assets/javascripts/reports/reports_datatable.js @@ -224,7 +224,7 @@ }, createdRow: addAttributesToRow, initComplete: function(settings) { - initActionToolbar(); + window.initActionToolbar(); actionToolbarComponent.setBottomOffset(68); const { nTableWrapper: dataTableWrapper } = settings; diff --git a/app/views/label_templates/index.html.erb b/app/views/label_templates/index.html.erb index d0e89d6d3..e16a3fe79 100644 --- a/app/views/label_templates/index.html.erb +++ b/app/views/label_templates/index.html.erb @@ -55,6 +55,6 @@ <%= render partial: "index_toolbar" %> <%= render partial: "delete_modal" %> - <%= javascript_include_tag 'label_templates/label_templates_datatable' %> <%= javascript_include_tag 'vue_components_action_toolbar' %> + <%= javascript_include_tag 'label_templates/label_templates_datatable' %> <% end %> diff --git a/app/views/reports/index.html.erb b/app/views/reports/index.html.erb index c383071f9..602b2eab3 100644 --- a/app/views/reports/index.html.erb +++ b/app/views/reports/index.html.erb @@ -68,8 +68,8 @@ <%= render partial: 'reports/modals/regenerate' %> +<%= javascript_include_tag "vue_components_action_toolbar" %> <%= javascript_include_tag 'reports/save_pdf_to_inventory' %> <%= javascript_include_tag 'reports/reports_datatable' %> <%= javascript_include_tag 'pdf_js' %> <%= stylesheet_link_tag 'pdf_js_styles' %> -<%= javascript_include_tag "vue_components_action_toolbar" %> diff --git a/app/views/repositories/index.html.erb b/app/views/repositories/index.html.erb index dace947c3..21a1b659d 100644 --- a/app/views/repositories/index.html.erb +++ b/app/views/repositories/index.html.erb @@ -61,7 +61,7 @@ +<%= javascript_include_tag "vue_components_action_toolbar" %> <%= javascript_include_tag "repositories/index" %> <%= javascript_include_tag "repositories/share_modal" %> <%= stylesheet_link_tag 'datatables' %> -<%= javascript_include_tag "vue_components_action_toolbar" %>