Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ gem 'pagy', '~> 43.2'
gem 'icalendar'
gem 'tzinfo-data'

gem 'chosen-rails', github: 'olleolleolle/chosen-rails', branch: 'support-rails-8'
# Chosen JavaScript and CSS loaded from vendor/assets/ instead of gem
# The chosen-rails gem has broken CoffeeScript compilation on Rails 8.1
gem 'commonmarker'

gem 'faraday'
Expand Down
41 changes: 0 additions & 41 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ GIT
sitemap_generator (6.3.0)
builder (~> 3.0)

GIT
remote: https://github.com/olleolleolle/chosen-rails.git
revision: cfef31cb30ed6d0dfd65cae0ff6f4a2943812df0
branch: support-rails-8
specs:
chosen-rails (2.0.0)
coffee-rails (>= 3.2)
dartsass-rails (>= 0.5.0)
railties (>= 3.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -164,13 +154,6 @@ GEM
logger (~> 1.5)
cocoon (1.2.15)
coderay (1.1.3)
coffee-rails (5.0.0)
coffee-script (>= 2.2.0)
railties (>= 5.2.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
commonmarker (2.6.3-aarch64-linux)
commonmarker (2.6.3-arm64-darwin)
commonmarker (2.6.3-x86_64-darwin)
Expand All @@ -184,9 +167,6 @@ GEM
css_parser (1.14.0)
addressable
csv (3.3.5)
dartsass-rails (0.5.1)
railties (>= 6.0.0)
sass-embedded (~> 1.63)
database_cleaner (2.1.0)
database_cleaner-active_record (>= 2, < 3)
database_cleaner-active_record (2.2.2)
Expand Down Expand Up @@ -234,18 +214,6 @@ GEM
activerecord (>= 4.0.0)
globalid (1.3.0)
activesupport (>= 6.1)
google-protobuf (4.33.2-aarch64-linux-gnu)
bigdecimal
rake (>= 13)
google-protobuf (4.33.2-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.33.2-x86_64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.33.2-x86_64-linux-gnu)
bigdecimal
rake (>= 13)
haml (7.2.0)
temple (>= 0.8.2)
thor
Expand Down Expand Up @@ -548,14 +516,6 @@ GEM
ruby-vips (2.3.0)
ffi (~> 1.12)
logger
sass-embedded (1.97.0-aarch64-linux-gnu)
google-protobuf (~> 4.31)
sass-embedded (1.97.0-arm64-darwin)
google-protobuf (~> 4.31)
sass-embedded (1.97.0-x86_64-darwin)
google-protobuf (~> 4.31)
sass-embedded (1.97.0-x86_64-linux-gnu)
google-protobuf (~> 4.31)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
Expand Down Expand Up @@ -659,7 +619,6 @@ DEPENDENCIES
capybara-playwright-driver
carrierwave
carrierwave-aws (~> 1.6)
chosen-rails!
cocoon
commonmarker
csv
Expand Down
10 changes: 5 additions & 5 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require popper
//= require bootstrap
//= require jquery
//= require rails-ujs
//= require activestorage
//= require jquery-ui
//= require autocomplete-rails
//= require chosen-jquery
//= require chosen.jquery
//= require 'jsimple-star-rating.min.js'
//= require pickadate/picker
//= require pickadate/picker.date
Expand Down Expand Up @@ -59,12 +59,12 @@ $(function() {
}).show();
});

$('select').chosen(function(){
allow_single_deselect: true
$('select').chosen({
allow_single_deselect: true,
no_results_text: 'No results matched'
});

$('#member_lookup_id').chosen().change(function(e) {
$('#member_lookup_id').change(function(e) {
$('#view_profile').attr('href', '/admin/members/' + $(this).val())
});

Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/members/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%h1 Members Directory
.row.mb-4
.col-12.col-md-6
= select_tag 'member_lookup_id', options_for_select(@members.collect{ |u| ["#{u.full_name} (#{u.email})", u.id] }), { class: 'chosen-select' }
= select_tag 'member_lookup_id', options_for_select([['Select a member...', '']] + @members.collect{ |u| ["#{u.full_name} (#{u.email})", u.id] }), { class: 'chosen-select' }
.row
.col
= link_to 'View Profile', '#', { class: 'btn btn-primary', id: 'view_profile' }
Binary file added vendor/assets/images/chosen-sprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added vendor/assets/images/chosen-sprite@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading