Open jdlrobson opened 3 years ago
The line \$.fn.colorbox.resize();
in addfield.html is dead code and thus removed. Can this be done and sent through a standalone PR ?
The line
\$.fn.colorbox.resize();
in addfield.html is dead code and thus removed. Can this be done and sent through a standalone PR ?
It could, but to be honest I don't think it would be a valuable use of time (for you or the reviewer) unless you are planning to take on the entirety of the issue here.
Might as well learn something new. Working on this. @/jdlrobson Let me know if you have more resources/tips other than the ones mentioned above. Thanks for writing the steps to reproduce everything ☺️
Neat! I'm happy to help out with any challenges you hit here. Definitely will be a good learning opportunity :)
https://www.jacklmoore.com/colorbox/ does a good job of documenting the library we're currently using and https://api.jqueryui.com/dialog/ is what we can hopefully migrate to. I'd suggest playing around with both the libraries and understanding how they work as a first step and how we use colorbox (and if said things are also possible with the dialog).
Assignees removed automatically after 14 days.
Per #1732 we would like to update from jQuery 1 to jQuery 3. One of the big blockers to doing this is our use of the jQuery colorbox library.
The library is used in the following templates: openlibrary/templates/lists/widget.html openlibrary/templates/books/edit/addfield.html openlibrary/plugins/openlibrary/js/add_new_field.js openlibrary/plugins/openlibrary/js/ol.js openlibrary/plugins/openlibrary/js/utils.js openlibrary/plugins/openlibrary/js/patron-metadata/index.js
jquery colorbox makes use of the
href
option to construct a dialog. For example if href is '#addList' the contents of$('#addList').html()
are shown in a dialog.I propose we replace this library with jQuery UI's dialog
Api options here: https://api.jqueryui.com/dialog/
Evidence / Screenshot (if possible)
Going to https://openlibrary.org/works/OL47713W/The_Life_and_Death_of_Jason and calling:
results in:
Acceptance criteria
$.colorbox.close();
are replaced. Instead close any open dialogs.\$.fn.colorbox.resize();
in addfield.html is dead code and thus removedQA
Test the following scenarios:
Stakeholders
@jdlrobson