Closed karindalziel closed 5 years ago
I don't think we're doing any page or section-specific loading of JS in our Orchid-powered apps :thinking:
Here's how we did it for Lewis and Clark though: https://github.com/CDRH/lewisandclark/blob/master/app/assets/javascripts/search.js and https://github.com/CDRH/lewisandclark/blob/master/app/views/items/search.html.erb
Add a file to app/assets/javascripts/
and set/add it to the array @ext_js
in the controller or view
Currently I am putting a bit of javascript int he view on pages where I am building a gallery using ekko lightbox. We should move this out into a js file and only include it on the needed pages. I'm not sure the best way to do that.
see: https://github.com/CDRH/family_letters/blob/97c9b8d1c94ccc12d24c57f2516b5e5160026e33/app/views/explore/exhibit_03.html.erb#L24