diff --git a/Gemfile b/Gemfile
index 7b809cb7..1e700444 100644
--- a/Gemfile
+++ b/Gemfile
@@ -7,9 +7,6 @@ gemspec
gem 'rails', '~> 7.0.1'
-# Lock i18n to 1.14.x for: https://github.com/ruby-i18n/i18n/issues/735
-gem 'i18n', '~> 1.14.0'
-
# Lock minitest to 5.x until Rails 7.1+ adds Minitest 6.0 support
# Minitest 6.0.0 was released Dec 2024 with breaking API changes
gem 'minitest', '~> 5.0'
diff --git a/app/views/kaui/components/menu_dropdown/_menu_dropdown.html.erb b/app/views/kaui/components/menu_dropdown/_menu_dropdown.html.erb
index 6d70c6a7..bef32b4e 100644
--- a/app/views/kaui/components/menu_dropdown/_menu_dropdown.html.erb
+++ b/app/views/kaui/components/menu_dropdown/_menu_dropdown.html.erb
@@ -17,6 +17,7 @@
<% menu_items&.each do |item| %>
-
@@ -31,28 +32,21 @@
<%= javascript_tag do %>
document.addEventListener('DOMContentLoaded', function () {
- const button = document.getElementById('<%= dropdown_id %>_button');
- const menu = document.getElementById('<%= dropdown_id %>_menu');
- const wrapper = document.getElementById('<%= dropdown_id %>_wrapper');
+ var button = document.getElementById('<%= dropdown_id %>_button');
+ var menu = document.getElementById('<%= dropdown_id %>_menu');
+ var wrapper = document.getElementById('<%= dropdown_id %>_wrapper');
button.addEventListener('click', function (e) {
e.stopPropagation();
- const isShown = menu.style.display === 'block';
-
- // Close all other open dropdowns first (including other dots menus)
- document.querySelectorAll('.dropdown-menu').forEach(function (m) {
- if (m !== menu) {
- m.style.display = 'none';
- }
- });
-
- // Toggle this one
+ var isShown = menu.style.display === 'block';
menu.style.display = isShown ? 'none' : 'block';
+ button.setAttribute('aria-expanded', !isShown);
});
document.addEventListener('click', function (e) {
- if (!wrapper.contains(e.target)) {
+ if (!wrapper.contains(e.target) && menu.style.display === 'block') {
menu.style.display = 'none';
+ button.setAttribute('aria-expanded', 'false');
}
});
});
diff --git a/app/views/kaui/invoices/_multi_functions_bar.html.erb b/app/views/kaui/invoices/_multi_functions_bar.html.erb
index 7d32a96c..b4e68ce3 100644
--- a/app/views/kaui/invoices/_multi_functions_bar.html.erb
+++ b/app/views/kaui/invoices/_multi_functions_bar.html.erb
@@ -45,10 +45,7 @@
type: "button",
html_class: "kaui-button custom-hover",
html_options: {
- id: "dropdownMenu1",
- data: {
- bs_toggle: "dropdown"
- }
+ id: "dropdownMenu1"
}
} %>
@@ -213,13 +210,15 @@
<%= javascript_tag do %>
$(document).ready(function() {
- // Initialize Bootstrap dropdown
- var dropdownElementList = [].slice.call(document.querySelectorAll('.dropdown-toggle'));
- var dropdownList = dropdownElementList.map(function (dropdownToggleEl) {
- return new bootstrap.Dropdown(dropdownToggleEl);
+ // Toggle Edit Columns dropdown
+ $('#dropdownMenu1').on('click', function(e) {
+ e.stopPropagation();
+ var $menu = $('#column-visibility');
+ $menu.toggleClass('show');
+ $(this).attr('aria-expanded', $menu.hasClass('show'));
});
- $('.dropdown-menu').on('click', 'input[type="checkbox"], label', function(event) {
+ $('#column-visibility').on('click', 'input[type="checkbox"], label', function(event) {
event.stopPropagation();
});
diff --git a/app/views/kaui/payments/_multi_functions_bar.html.erb b/app/views/kaui/payments/_multi_functions_bar.html.erb
index 7f0b409d..ea7b04b5 100644
--- a/app/views/kaui/payments/_multi_functions_bar.html.erb
+++ b/app/views/kaui/payments/_multi_functions_bar.html.erb
@@ -45,10 +45,7 @@
type: "button",
html_class: "kaui-button custom-hover",
html_options: {
- id: "dropdownMenu1",
- data: {
- bs_toggle: "dropdown"
- }
+ id: "dropdownMenu1"
}
} %>
@@ -213,13 +210,15 @@
<%= javascript_tag do %>
$(document).ready(function() {
- // Initialize Bootstrap dropdown
- var dropdownElementList = [].slice.call(document.querySelectorAll('.dropdown-toggle'));
- var dropdownList = dropdownElementList.map(function (dropdownToggleEl) {
- return new bootstrap.Dropdown(dropdownToggleEl);
+ // Toggle Edit Columns dropdown
+ $('#dropdownMenu1').on('click', function(e) {
+ e.stopPropagation();
+ var $menu = $('#column-visibility');
+ $menu.toggleClass('show');
+ $(this).attr('aria-expanded', $menu.hasClass('show'));
});
- $('.dropdown-menu').on('click', 'input[type="checkbox"], label', function(event) {
+ $('#column-visibility').on('click', 'input[type="checkbox"], label', function(event) {
event.stopPropagation();
});