Skip to content

Commit

Permalink
[#4608] Disable datatables
Browse files Browse the repository at this point in the history
  • Loading branch information
christinach committed Jan 7, 2025
1 parent 0bb6bc5 commit 84c74bf
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 114 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ gem 'honeybadger'
gem 'jbuilder', '~> 2.0'
# Use jquery as the JavaScript library
# jest tests use yarn to get jquery; if upgrading here keep that version in sync
gem 'jquery-datatables' # used by requests (please do not remove)
gem 'jquery-rails'
gem 'lcsort', '>= 0.9.1'
gem 'library_stdnums'
Expand Down
2 changes: 0 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ GEM
jbuilder (2.13.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jquery-datatables (1.10.20)
jquery-rails (4.6.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
Expand Down Expand Up @@ -791,7 +790,6 @@ DEPENDENCIES
high_voltage
honeybadger
jbuilder (~> 2.0)
jquery-datatables
jquery-rails
lcsort (>= 0.9.1)
library_stdnums
Expand Down
59 changes: 0 additions & 59 deletions app/assets/javascripts/datatables.js

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/javascripts/requests/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@
//= require jquery_ujs
//= require popper
//= require bootstrap
//= require datatables

//= require_tree .
9 changes: 0 additions & 9 deletions app/assets/javascripts/requests/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,6 @@ $(function () {
checkRows(this);
});

jQuery(function () {
return $('.tablesorter').DataTable({
language: {
search: 'Search by Enumeration',
},
ordering: false,
});
});

$('.table input[type=checkbox]').on('change', function () {
$(this).closest('tr').toggleClass('selected', $(this).is(':checked'));
checkRows(this);
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,5 @@

@import 'shame';

@import "datatables";
@import "lux_customizations";
@import "stackmap_customizations";
15 changes: 0 additions & 15 deletions app/assets/stylesheets/datatables.scss

This file was deleted.

17 changes: 0 additions & 17 deletions app/assets/stylesheets/requests/request.scss
Original file line number Diff line number Diff line change
Expand Up @@ -241,23 +241,6 @@ input[type="radio"] + label {
max-width: 100%;
}

.blacklight-request div.dataTables_wrapper .row:first-child .col-sm-12:last-child {
padding-left: 15px;
}

.blacklight-request div.dataTables_wrapper div.dataTables_filter label {
display: block;
}

.blacklight-request div.dataTables_wrapper div.dataTables_filter input {
display: block;
min-height: 44px;
}

.blacklight-request div.dataTables_wrapper div.dataTables_paginate ul.pagination {
justify-content: center;
}

.blacklight-request .table-responsive-sm {
overflow-x: unset;
}
Expand Down
7 changes: 0 additions & 7 deletions app/helpers/requests/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,6 @@ def submit_message(requestable_list)
end
end

# only show the table sort if there are enough items
# to make it worthwhile
def show_tablesorter(requestable_list)
return "tablesorter" if table_sorter_present?(requestable_list)
""
end

def table_sorter_present?(requestable_list)
requestable_list.size > 5
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/requests/form/_requestable_list_aeon.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="table-responsive-sm">
<table class="table table-striped table-bordered request--available_items <%= show_tablesorter(requestable_list) %>" summary='<%= current_location_label(@request.location_label, requestable_list) %>'>
<table class="table table-striped table-bordered request--available_items" summary='<%= current_location_label(@request.location_label, requestable_list) %>'>
<thead class="visually-hidden-sm">
<th class="w-25">Enumeration</th>
<th>Status</th>
Expand Down
2 changes: 1 addition & 1 deletion app/views/requests/form/_requestable_list_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
</div>
<div class="table-responsive-sm">
<table class="table table-striped table-bordered request--available_items <%= show_tablesorter(requestable_list) %>" summary='<%= current_location_label(@request.location_label, requestable_list) %>'>
<table class="table table-striped table-bordered request--available_items" summary='<%= current_location_label(@request.location_label, requestable_list) %>'>
<thead class="visually-hidden-sm">
<th>Select</th>
<th class="w-25">Enumeration</th>
Expand Down

0 comments on commit 84c74bf

Please sign in to comment.