A widget for choosing concepts from the Unified Astronomy Thesaurus. It currently looks like this:
See dist/index.html for a minimal example webpage that will demonstrate the concept chooser.
We don’t currently host a world-accessible version of the UAT chooser, so if you want to embed it in your own website, you must build and upload it yourself. To do so, run
$ npm install $ npm run build
and then copy the contents of the
dist/ directory, minus
your web server. Tweak the sample HTML and embed it in your webpage as
TODO: show how to extract the list of selected keywords!
What I’ve set up here is an
npm run build command that will combine the
widget code with the script.aculo.us modules that it uses. That way, the only
special thing you need to do is to make sure to load
loading this package.
The main output file created by the
npm run build command is
dist/uat-chooser.js. This module is built in Webpack’s
so that if you load it in a webpage it will create a global variable named
uat_chooser that represents the module. That module currently has one API
function takes the ID of a
<div class="uat-widget"> element that will be
set up with the UAT concept-choosing interface.
The original code was donated by Precision Computer Works, Inc. / eJournalPress to the American Astronomical Society. Licensed under the MIT License.