Replace current "autcomplete" (E.g. for access points, repository) with a standard library
|Category:||-||Estimated time:||80.00 hours|
The current AtoM autocomplete.js script is a custom and complex script that uses old versions of the Yahoo UI and jQuery (v1.8.3):https://jquery.com/ libraries. The script also uses the unconventional method of using iframes to create new linked resources like subject terms, repositories, etc. The script is difficult to understand and maintain.
Key features of current script:
- Allows adding or linking multiple related resources without reloading the page
- Allows typing a few letters to launch an AJAX query which returns a list of matching resource names (e.g. subject terms), and an item can be selected from the list to link it to the current resource
- Allows adding a new related resource by typing the desired name in the autocomplete field (if you have permissions)
- Prevents adding a related resource that duplicates an existing one (e.g. prevents adding the subject term "Bridges" twice to the same resource)
- Prevents adding duplicate resources (e.g. if "Arts and culture" already exists in the Subjects taxonomy, it won't add a new subject with the same name)
- Replace the current autocomplete.js with the new library
- Update existing AtoM forms using the autocomplete.js to the new library
- Add HTTP API endpoints as required to allow adding new linked resources via AJAX "POST" request, instead of using the current method of loading an HTML form in an iframe, then submitting the iframe form.