In patron lists, one of the options for each list is "Print patron cards." This operation takes place in a Greybox modal. This can be replaced with a Bootstrap modal.
Created attachment 52591 [details] [review] Bug 8290 - Replace usage of Greybox modals with Bootstrap modals This patch is a proof-of-concept for replacing Greybox modals in situations where in-modal page transitions happen. This one addresses patron card export from the patron lists page. To test you must have at least one patron lists containing patrons. - Apply the patch and go to Patrons -> Patron lists. - In the 'Actions' menu associated with your list, choose 'Print patron cards.' A modal window should be triggered. - In the modal window, change settings as necessary and click the "Export" button. - The modal should reload and display a link to download a PDF. Confirm that the PDF download works correctly and that the correct patron batch was processed. - Repeat the process and confirm at each step that clicking the 'X' button or the 'Cancel' link dismisses the modal window. To confirm that changes to the patron card print template has not adversely affected printing patron cards from the patron card creator page: - Go to Tools -> Patron card creator. - Choose Manage -> Card batches. - Click 'Export' for any batch. - Confirm that the Greybox modal still works correctly for patron card export.
Created attachment 52613 [details] [review] [SIGNED-OFF]Bug 16778: Replace usage of Greybox modals with Bootstrap modals This patch is a proof-of-concept for replacing Greybox modals in situations where in-modal page transitions happen. This one addresses patron card export from the patron lists page. To test you must have at least one patron lists containing patrons. - Apply the patch and go to Patrons -> Patron lists. - In the 'Actions' menu associated with your list, choose 'Print patron cards.' A modal window should be triggered. - In the modal window, change settings as necessary and click the "Export" button. - The modal should reload and display a link to download a PDF. Confirm that the PDF download works correctly and that the correct patron batch was processed. - Repeat the process and confirm at each step that clicking the 'X' button or the 'Cancel' link dismisses the modal window. To confirm that changes to the patron card print template has not adversely affected printing patron cards from the patron card creator page: - Go to Tools -> Patron card creator. - Choose Manage -> Card batches. - Click 'Export' for any batch. - Confirm that the Greybox modal still works correctly for patron card export. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised
Comment on attachment 52613 [details] [review] [SIGNED-OFF]Bug 16778: Replace usage of Greybox modals with Bootstrap modals Review of attachment 52613 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt @@ +31,5 @@ > + patronExportModal.modal("show"); > + }); > + > + patronExportModal.on("hidden", function(){ > + patronExportModalBody.html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); Is this really useful?
(In reply to Jonathan Druart from comment #3) > Is this really useful? It is useful if you happen to trigger more than one instance of the modal during one session. Triggering the modal populates the contents with certain data. The next time the modal is triggered, there may be a delay between when it is displayed and when the new information is loaded. Populating the modal body with the "loading" indicator when the modal is closed means that when it is triggered again the user sees "loading" instead of data from the last operation.
Created attachment 52855 [details] [review] Bug 16778: Replace usage of Greybox modals with Bootstrap modals This patch is a proof-of-concept for replacing Greybox modals in situations where in-modal page transitions happen. This one addresses patron card export from the patron lists page. To test you must have at least one patron lists containing patrons. - Apply the patch and go to Patrons -> Patron lists. - In the 'Actions' menu associated with your list, choose 'Print patron cards.' A modal window should be triggered. - In the modal window, change settings as necessary and click the "Export" button. - The modal should reload and display a link to download a PDF. Confirm that the PDF download works correctly and that the correct patron batch was processed. - Repeat the process and confirm at each step that clicking the 'X' button or the 'Cancel' link dismisses the modal window. To confirm that changes to the patron card print template has not adversely affected printing patron cards from the patron card creator page: - Go to Tools -> Patron card creator. - Choose Manage -> Card batches. - Click 'Export' for any batch. - Confirm that the Greybox modal still works correctly for patron card export. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 16.11, thanks Owen!
Pushed in 16.05. Will be in 16.05.02.