Skip to content

Commit

Permalink
When multiple checked selectboxes and deselect one, preserve the acti…
Browse files Browse the repository at this point in the history
…ve request button
  • Loading branch information
christinach committed May 28, 2023
1 parent 22c41d0 commit 2895118
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/assets/javascripts/requests/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ $(function() {
if (selected && deMode && deLocation) {
activateRequestButton();
} else {
deactivateRequestButton();
if ($('input:checkbox').filter(':checked').length < 1){
deactivateRequestButton();
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions solr/conf/solrconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@
isbn_t^3
issn_s^3
lccn_s^3
uncontrolled_keyword_unstem_search^3
text
description_t
cjk_all
Expand All @@ -329,6 +330,7 @@
isbn_t^30
issn_s^30
lccn_s^30
uncontrolled_keyword_unstem_search^10
text^10
description_t^10
cjk_all^10
Expand Down
10 changes: 9 additions & 1 deletion spec/features/requests/request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,7 @@
end
end

it "does not allow reuesting of on order books" do
it "does not allow requesting of on order books" do
visit "requests/99125492003506421?mfhd=22927395910006421"
expect(page).to have_content 'This item is not available'
end
Expand Down Expand Up @@ -1605,6 +1605,14 @@
expect(confirm_email.subject).to eq("In Process Request")
end
end
context 'when multiple checkboxes selected' do
# if delivery mode in one checkbox parent is selected
# the request button is active
# deselecting another checkbox will not deactivate the request button
# visit 'requests/99125465081006421?mfhd=22922148510006421'
## better to work also ticket https://github.com/pulibrary/orangelight/issues/3595

end
end
# rubocop:enable RSpec/MultipleExpectations
end
Expand Down

0 comments on commit 2895118

Please sign in to comment.