app/assets/javascripts/bulkrax/navtabs.js.erb in bulkrax-5.4.2 vs app/assets/javascripts/bulkrax/navtabs.js.erb in bulkrax-5.5.0
- old
+ new
@@ -1,9 +1,26 @@
<% unless defined?(::Hyku) %>
// enables the tabs in the importers/exporters pages.
$(document).ready(function() {
- $('.nav-tabs a').click(function (e) {
+ $('.bulkrax-nav-tab-top-margin.nav-tabs a').click(function(e) {
e.preventDefault();
- $(this).tab('show');
+
+ // Remove active class from all tabs and hide all tab content
+ $('.bulkrax-nav-tab-top-margin.nav-tabs a').parent().removeClass('active');
+ $('.tab-content .tab-pane').removeClass('active');
+
+ // Add active class to clicked tab and show its content
+ $(this).parent().addClass('active');
+ $($(this).attr('href')).addClass('active');
});
+
+ $('#full-errors-tab, #full-errors-tab a').click(function(e) {
+ $('#raw-errors-tab, #bulkrax-raw-toggle-1').removeClass('active');
+ $('#full-errors-tab, #bulkrax-full-toggle-1').addClass('active');
+ })
+
+ $('#raw-errors-tab, #raw-errors-tab a').click(function(e) {
+ $('#full-errors-tab, #bulkrax-full-toggle-1').removeClass('active');
+ $('#raw-errors-tab, #bulkrax-raw-toggle-1').addClass('active');
+ })
});
<% end %>