CenterForDigitalHumanities / glossing-entries

Descriptions of new glosses and manuscripts, a data entry interface
1 stars 2 forks source link

Issue 144 - Modal for adding & deleting references to a record (continuation from issue 142 & 143) #203

Closed TheTuTran closed 1 month ago

TheTuTran commented 3 months ago

For issue #142 (completed) The goal of this issue is to render the view of the references to a gloss on ng.html. It starts with a query for references attached to the gloss hash. A button to open up a modal is added. The modal contains a form that allows for attaching references to a gloss. The modal is connected to a function that creates a gloss. Right now, the remove button does not work because that is apart of issue 144. Also changed the css slightly on ng.html because with the addition of new widget, the white background against the white form makes it visually cluttered.

For Issue #143 (completed?) The goal of issue 143 is to be able to add references to a record (already implemented). There will be edit and delete icons on the reference cards. These icons will edit and delete a reference. Only the add reference and edit functionality is required (the remove is part of issue 144).

  1. A custom html modal was created and all html & js related code was moved to BibliographicCitationModal.js
  2. Edit and Delete buttons added onto reference cards.
  3. Adding reference already works.
  4. Editing functionality added
  5. Remove functionality added old: image new: image

For Issue #144 Right now, the user can click the trash icon to send a delete request with the citation id. The user can delete the citation with 1 click, and this automatically refreshes the DOM. Added appropriate permissions checking & error handling for that.