In completing this assignment you MAY use/access the following resources:
You may NOT use/access:
- Resources not expressly listed above, including, but not limited to,
the following ...
- Source code not provided as part of this assignment. (Obviously, this
includes, but is not limited to, source code written by other students
whether current or in the past).
- Code-generating tools (of which ChatGPT is one example).
- Any web sites not directly linked to from the homework assignment.
Failure to abide by these guidelines will result in a zero for the assignment
and the incident will be reported to the university provost as a violation of
the university academic integrity policy. A second incident of academic
dishonesty (whether from this course or another computer science course) will
result in an F in the course.
Here are some actions to take:
- Determine how you will implement a popup action. This can be done using a
plugin, using a CSS framework, or using hand-coded CSS/Javascript.
- Modify the title links on the home page to cause produce an Ajax request and
populate a popup with the contents of the book detail page (including the
delete and modify buttons if the user has permission for those actions in
the current books). Also, as before, if a user is logged in then clicking the
title links should not produce any action.
- If the user clicks the Modify button it should behave exactly as it did
in the previous assignment (by going to the Add Books page with appropriate
parameters to provide the edit action).
- If the user clicks the Delete button it should, without leaving the page,
cause an Ajax request which will delete the specified book. When the request
finished successfully, the deleted book should be removed from the list on
the home page (without reloading the page). NOTE: We still need to protect
our code from CSRF attacks (even in an Ajax request) so we need to have our
Javascript code pass the current csrf token along with the request to
delete the book.