Feature #13318

Replace current "autcomplete" (E.g. for access points, repository) with a standard library

Added by David Juhasz over 1 year ago.

Status:NewStart date:05/15/2020
Priority:MediumDue date:
Assignee:-% Done:


Category:-Estimated time:80.00 hours
Target version:-
Sponsored:No Tested version:



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:

  1. Allows adding or linking multiple related resources without reloading the page
  2. 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
  3. Allows adding a new related resource by typing the desired name in the autocomplete field (if you have permissions)
  4. Prevents adding a related resource that duplicates an existing one (e.g. prevents adding the subject term "Bridges" twice to the same resource)
  5. 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)

Proposed solution:

  • Research an existing JavaScript library that supports the key features listed above. Preferably the library selected is a jQuery library or a vanilla JavaScript library, to avoid adding new dependencies to AtoM
  • 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.

atom_autcomplete_subjects_20200515.png (29.5 KB) David Juhasz, 05/15/2020 05:53 PM

Also available in: Atom PDF