Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encapsulate the asset_details.html scripts #2491

Merged
merged 6 commits into from
Aug 14, 2024
Merged

Conversation

joshuastegmaier
Copy link
Collaborator

There are a lot of small changes, but the overall change is making sure all of our scripts on the asset detail page are encapsulated. All inline calls to JavaScript (onclick) were changed to use event listeners instead.

Additionally, I was able to use Split.js as a module, but unfortunately it wasn't possible to do with OpenSeadragon or OpenSeadragon Filters.

Some globals are still being used from scripts like base.js. Modularizing that is a future ticket, since it touches a lot of places in the site.

…g those to the module. Moved guide template to live with the rest of the asset_detail sub-templates. Reorganized guide.js slightly and removed unused code. Changed eslint configurations to handle modules
…med existing quick-tips.js to quick-tips-setup.js to reflect what it does, and modified to use the modules/quick-tips.js module.. Modified base.html quick-tips code to use the module. Modified tempalte to hide 'Campaign Tips' link/button for campaigns that don't have any cards.
…ne onclick handler for select language to be in ocr.js
…data for asset-reservation.js to separate script element to allow access from within the module--passing it directly to the script tag of a module does not work like it does for a normal script.
…r.js to separate script element to allowing access to the data in the module. Moved inline onclick handlers for viewer image filters into click handlers in viewer.js
…split.js import to viewer-split.js and removed script tag for it.
@joshuastegmaier joshuastegmaier marked this pull request as ready for review August 14, 2024 15:42
@jkueloc jkueloc merged commit 7aa2263 into main Aug 14, 2024
7 checks passed
@joshuastegmaier joshuastegmaier deleted the CONCD-907-jstegmaier-js-encap branch August 27, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants