From 0d76532b6b1f2c640b9ea6c22b1a6c1cec418358 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Sun, 17 Dec 2023 16:38:58 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20some=20javascript=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will fix a few javascript errors, at least enough to get the the bootstrap javascript to work correctly. We're still getting a the almond-rails js error but that seems to exist in previous Hyku as well. --- Gemfile | 1 + Gemfile.lock | 5 +++++ app/assets/javascripts/application.js | 9 ++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index a350101b3..f3c4dda27 100644 --- a/Gemfile +++ b/Gemfile @@ -96,6 +96,7 @@ gem 'spring-watcher-listen', '~> 2.0.0', group: %i[development] gem 'terser' # to support the Safe Navigation / Optional Chaining operator (?.) and avoid uglifier precompile issue gem 'tether-rails' gem 'turbolinks', '~> 5' +gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript' gem 'web-console', '>= 3.3.0', group: %i[development] # <%= console %> in views gem 'webdrivers', '~> 4.7.0', group: %i[test] gem 'webmock', group: %i[test] diff --git a/Gemfile.lock b/Gemfile.lock index 6676493a1..3e37563c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1295,6 +1295,10 @@ GEM turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) + twitter-typeahead-rails (0.11.1.pre.corejavascript) + actionpack (>= 3.1) + jquery-rails + railties (>= 3.1) typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) @@ -1459,6 +1463,7 @@ DEPENDENCIES terser tether-rails turbolinks (~> 5) + twitter-typeahead-rails (= 0.11.1.pre.corejavascript) web-console (>= 3.3.0) webdrivers (~> 4.7.0) webmock diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 852de9889..1f6185b0c 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -10,12 +10,10 @@ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details // about supported directives. // -//= require codemirror -//= require codemirror-autorefresh -//= require codemirror/modes/css //= require jquery3 //= require rails-ujs //= require popper +//= require twitter/typeahead //= require bootstrap //= require jquery.fontselect //= require jquery.dataTables @@ -47,6 +45,11 @@ //= require bulkrax/application //= require hyrax + +//= require codemirror +//= require codemirror-autorefresh +//= require codemirror/modes/css + //= require iiif_print //= require jquery.flot.pie