Skip to content

Commit

Permalink
update shelving order to sort in reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
dnoneill committed Feb 13, 2024
1 parent 72d50b8 commit 0bed8fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/javascript/item_selector/item_selector_filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var itemSelectorFiltering = (function() {
// List.js dynamically injects behavior, so we need to check
// if the list is sortable before setting the default sort
if($.isFunction(list.sort)) {
list.sort('callnumber', { order: 'asc'});
list.sort('callnumber', { order: 'desc'});
}
},

Expand Down
2 changes: 1 addition & 1 deletion app/views/application/_item_selector.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</div>
<div id="item-selector" class="item-selector" data-limit-selected-items="<%= f.object.item_limit if f.object.item_limit.to_i > 1 %>" data-counter-target="[data-items-counter='true']">
<div class='list'>
<% f.object.all_holdings.sort_by(&:callnumber).each.with_index(1) do |holding, index| %>
<% f.object.all_holdings.sort_by(&:callnumber).reverse!.each.with_index(1) do |holding, index| %>
<div class='input-group'>
<% if f.object.item_limit.to_i == 1 %>
<span class='input-group-addon barcode-checkbox'>
Expand Down

0 comments on commit 0bed8fc

Please sign in to comment.