In order to conform to best practices for performance staff client template javascript should be in the footer instead of the header. This patch will do so for patron module templates.
Created attachment 69200 [details] [review] Bug 19641: Move patron templates to the footer This patch modifies the staff client patron module templates so that JavaScript is included in the footer instead of the header. This patch touches a lot of files because the changes are all interdependent, affecting a couple of module-wide include files. To test, apply the patch and test the JavaScript-driven features of the modified templates: All button controls, DataTables functionality, tabs, etc. Patrons -> Patrons home, patron search results -> Manage pending modification requests -> Patron detail page -> Edit patron -> Set guarantor -> Fines -> Account, Pay fines, Create manual invoice, Create manual credit -> Print receipts for different kinds of charges -> Routing lists -> Circulation history -> Holds history -> Notices -> Statistics -> Files -> Purchase suggestions -> Discharges -> Housebound -> Set permissions -> Change password -> Print summary, slips, and overdues -> Update child to adult patron type Patron toolbar and patron search bar operations should work correctly on all pages. This patch also updates the template for searching the Norwegian national patron database, but it has NOT been tested.
Created attachment 69415 [details] [review] Bug 19641: Move patron templates to the footer This patch modifies the staff client patron module templates so that JavaScript is included in the footer instead of the header. This patch touches a lot of files because the changes are all interdependent, affecting a couple of module-wide include files. To test, apply the patch and test the JavaScript-driven features of the modified templates: All button controls, DataTables functionality, tabs, etc. Patrons -> Patrons home, patron search results -> Manage pending modification requests -> Patron detail page -> Edit patron -> Set guarantor -> Fines -> Account, Pay fines, Create manual invoice, Create manual credit -> Print receipts for different kinds of charges -> Routing lists -> Circulation history -> Holds history -> Notices -> Statistics -> Files -> Purchase suggestions -> Discharges -> Housebound -> Set permissions -> Change password -> Print summary, slips, and overdues -> Update child to adult patron type Patron toolbar and patron search bar operations should work correctly on all pages. This patch also updates the template for searching the Norwegian national patron database, but it has NOT been tested. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
One of the dependencies is not in the QA queue yet, moving to BLOCKED for now, please move back once dependencies have been sorted.
Hi Owen, looks good, but few thinks: So, if I want to update child to adult, and have more patron categories for adults, than I should see the form for choosing one of them, but I get blank page... Also the javascript function confirm_updatechild is defined twice: in members-menu.js and update-child.tt. Few buttons in patron toolbar on checkouts screen does not work - circulation.tt is not part of this patch and so does not include members-menu.js. I think you will fix this bug 19728, true?
*** Bug 19728 has been marked as a duplicate of this bug. ***
(In reply to Josef Moravec from comment #4) > Few buttons in patron toolbar on checkouts screen does not work - > circulation.tt is not part of this patch and so does not include > members-menu.js. I think you will fix this bug 19728, true? I've marked 19728 as a duplicate of this bug and will submit a follow-up that includes circulation.tt and circulation_batch_checkouts.tt
Created attachment 70428 [details] [review] Bug 19641: Move patron templates to the footer This patch modifies the staff client patron module templates so that JavaScript is included in the footer instead of the header. This patch touches a lot of files because the changes are all interdependent, affecting a couple of module-wide include files. To test, apply the patch and test the JavaScript-driven features of the modified templates: All button controls, DataTables functionality, tabs, etc. Patrons -> Patrons home, patron search results -> Manage pending modification requests -> Patron detail page -> Edit patron -> Set guarantor -> Fines -> Account, Pay fines, Create manual invoice, Create manual credit -> Print receipts for different kinds of charges -> Routing lists -> Circulation history -> Holds history -> Notices -> Statistics -> Files -> Purchase suggestions -> Discharges -> Housebound -> Set permissions -> Change password -> Print summary, slips, and overdues -> Update child to adult patron type Patron toolbar and patron search bar operations should work correctly on all pages. This patch also updates the template for searching the Norwegian national patron database, but it has NOT been tested. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Created attachment 70429 [details] [review] Bug 19641 (Follow-up) Update circulation.tt too This patch makes the same JS-to-footer changes to circulation.tt. Inclusion of this template in this bug is necessary because it includes members-toolbar.inc. To test, apply the patch and clear your browser cache if necessary. - Enter a patron card for checkout - Test any JavaScript-driven actions on the checkout page, for instance: - Select all/clear all controls - Datepicker/timepickers - Datatable sorting, columns configuration - Renewals, check-ins - Patron message interactions, print slip, and other toolbar actions - Checkout exports - Search to hold - Tab loading: Restrictions, Holds, Clubs
Created attachment 70433 [details] [review] Bug 19641 (Follow-up) Correct popup templates This patch corrects the footer include for two patron-related popup windows. popup-bottom.inc should be considered obsolete, and "'intranet-bottom.inc' popup_window=1" used in its place. To test you must have more than one adult-type patron category defined. - Locate and view a child-type patron record. - From the "More" menu in the toolbar, choose "Update child to adult patron." - The popup window which appears should look correct and work correctly. - Add a new patron and enter the first and last names of an existing patron. - When Koha asks to confirm a possible duplicate record, click the "View existing record" link. The popup which is triggered should look correct.
Created attachment 70720 [details] [review] Bug 19641 (Follow-up) Correct popup templates This patch corrects the footer include for two patron-related popup windows. popup-bottom.inc should be considered obsolete, and "'intranet-bottom.inc' popup_window=1" used in its place. To test you must have more than one adult-type patron category defined. - Locate and view a child-type patron record. - From the "More" menu in the toolbar, choose "Update child to adult patron." - The popup window which appears should look correct and work correctly. - Add a new patron and enter the first and last names of an existing patron. - When Koha asks to confirm a possible duplicate record, click the "View existing record" link. The popup which is triggered should look correct. Signed-off-by: Zoe Bennett <zoebennett1308@gmail.com>
Created attachment 70723 [details] [review] Bug 19641 (Follow-up) Correct popup templates This patch corrects the footer include for two patron-related popup windows. popup-bottom.inc should be considered obsolete, and "'intranet-bottom.inc' popup_window=1" used in its place. To test you must have more than one adult-type patron category defined. - Locate and view a child-type patron record. - From the "More" menu in the toolbar, choose "Update child to adult patron." - The popup window which appears should look correct and work correctly. - Add a new patron and enter the first and last names of an existing patron. - When Koha asks to confirm a possible duplicate record, click the "View existing record" link. The popup which is triggered should look correct. Signed-off-by: Zoe Bennett <zoebennett1308@gmail.com> Signed-off-by: Your Full Name <your_email>
Created attachment 70724 [details] [review] Bug 19641: Move patron templates to the footer This patch modifies the staff client patron module templates so that JavaScript is included in the footer instead of the header. This patch touches a lot of files because the changes are all interdependent, affecting a couple of module-wide include files. To test, apply the patch and test the JavaScript-driven features of the modified templates: All button controls, DataTables functionality, tabs, etc. Patrons -> Patrons home, patron search results -> Manage pending modification requests -> Patron detail page -> Edit patron -> Set guarantor -> Fines -> Account, Pay fines, Create manual invoice, Create manual credit -> Print receipts for different kinds of charges -> Routing lists -> Circulation history -> Holds history -> Notices -> Statistics -> Files -> Purchase suggestions -> Discharges -> Housebound -> Set permissions -> Change password -> Print summary, slips, and overdues -> Update child to adult patron type Patron toolbar and patron search bar operations should work correctly on all pages. This patch also updates the template for searching the Norwegian national patron database, but it has NOT been tested. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Your Full Name <your_email>
Created attachment 70725 [details] [review] Bug 19641 (Follow-up) Update circulation.tt too This patch makes the same JS-to-footer changes to circulation.tt. Inclusion of this template in this bug is necessary because it includes members-toolbar.inc. To test, apply the patch and clear your browser cache if necessary. - Enter a patron card for checkout - Test any JavaScript-driven actions on the checkout page, for instance: - Select all/clear all controls - Datepicker/timepickers - Datatable sorting, columns configuration - Renewals, check-ins - Patron message interactions, print slip, and other toolbar actions - Checkout exports - Search to hold - Tab loading: Restrictions, Holds, Clubs Signed-off-by: Your Full Name <your_email>
Created attachment 70726 [details] [review] Bug 19641 (Follow-up) Correct popup templates This patch corrects the footer include for two patron-related popup windows. popup-bottom.inc should be considered obsolete, and "'intranet-bottom.inc' popup_window=1" used in its place. To test you must have more than one adult-type patron category defined. - Locate and view a child-type patron record. - From the "More" menu in the toolbar, choose "Update child to adult patron." - The popup window which appears should look correct and work correctly. - Add a new patron and enter the first and last names of an existing patron. - When Koha asks to confirm a possible duplicate record, click the "View existing record" link. The popup which is triggered should look correct. Signed-off-by: Zoe Bennett <zoebennett1308@gmail.com> Signed-off-by: Your Full Name <your_email> Signed-off-by: Your Full Name <your_email>
Sorry, one more thing: When a patron has adult category, the "Update child to adult patron" looks disabled, but you can click on it, you get a dialog asking you if you want to update the child, and if you click OK, there is internal server error.
Created attachment 70953 [details] [review] Bug 19641: Follow-up - Fix update child menu option This follow-up corrects handling of clicks on the "Update child" menu option when the patron is an adult. Previously the click handler was conditionally added via template markup. This patch modifies it to use the data-tooltip attribute as an indicator that the option is disabled. To test, apply the patch and clear your browser cache if necessary. - Open an adult patron's record for viewing. - Choose More -> Update child from the toolbar menu. - The menu item should be disabled, and should show a tooltip. - Clicking the menu item should do nothing. - Open a child patron's record for viewing. - Choose More -> Update child from the toolbar menu. - The patron should be updated to an adult category.
Created attachment 71289 [details] [review] Bug 19641: Move patron templates to the footer This patch modifies the staff client patron module templates so that JavaScript is included in the footer instead of the header. This patch touches a lot of files because the changes are all interdependent, affecting a couple of module-wide include files. To test, apply the patch and test the JavaScript-driven features of the modified templates: All button controls, DataTables functionality, tabs, etc. Patrons -> Patrons home, patron search results -> Manage pending modification requests -> Patron detail page -> Edit patron -> Set guarantor -> Fines -> Account, Pay fines, Create manual invoice, Create manual credit -> Print receipts for different kinds of charges -> Routing lists -> Circulation history -> Holds history -> Notices -> Statistics -> Files -> Purchase suggestions -> Discharges -> Housebound -> Set permissions -> Change password -> Print summary, slips, and overdues -> Update child to adult patron type Patron toolbar and patron search bar operations should work correctly on all pages. This patch also updates the template for searching the Norwegian national patron database, but it has NOT been tested. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Zoe Bennett <zoebennett1308@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> https://bugs.koha-community.org/show_bug.cgi?id=19682
Created attachment 71290 [details] [review] Bug 19641: (Follow-up) Update circulation.tt too This patch makes the same JS-to-footer changes to circulation.tt. Inclusion of this template in this bug is necessary because it includes members-toolbar.inc. To test, apply the patch and clear your browser cache if necessary. - Enter a patron card for checkout - Test any JavaScript-driven actions on the checkout page, for instance: - Select all/clear all controls - Datepicker/timepickers - Datatable sorting, columns configuration - Renewals, check-ins - Patron message interactions, print slip, and other toolbar actions - Checkout exports - Search to hold - Tab loading: Restrictions, Holds, Clubs Signed-off-by: Zoe Bennett <zoebennett1308@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> https://bugs.koha-community.org/show_bug.cgi?id=19682
Created attachment 71291 [details] [review] Bug 19641: (Follow-up) Correct popup templates This patch corrects the footer include for two patron-related popup windows. popup-bottom.inc should be considered obsolete, and "'intranet-bottom.inc' popup_window=1" used in its place. To test you must have more than one adult-type patron category defined. - Locate and view a child-type patron record. - From the "More" menu in the toolbar, choose "Update child to adult patron." - The popup window which appears should look correct and work correctly. - Add a new patron and enter the first and last names of an existing patron. - When Koha asks to confirm a possible duplicate record, click the "View existing record" link. The popup which is triggered should look correct. Signed-off-by: Zoe Bennett <zoebennett1308@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> https://bugs.koha-community.org/show_bug.cgi?id=19682
Created attachment 71292 [details] [review] Bug 19641: (Follow-up) Fix update child menu option This follow-up corrects handling of clicks on the "Update child" menu option when the patron is an adult. Previously the click handler was conditionally added via template markup. This patch modifies it to use the data-tooltip attribute as an indicator that the option is disabled. To test, apply the patch and clear your browser cache if necessary. - Open an adult patron's record for viewing. - Choose More -> Update child from the toolbar menu. - The menu item should be disabled, and should show a tooltip. - Clicking the menu item should do nothing. - Open a child patron's record for viewing. - Choose More -> Update child from the toolbar menu. - The patron should be updated to an adult category. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> https://bugs.koha-community.org/show_bug.cgi?id=19682
Before: https://screenshots.firefox.com/aiunxdJJDVm8KUyk/pro.kohadev.org After: https://screenshots.firefox.com/hNHmyPk4g8VNpj0C/pro.kohadev.org Why is it better?
Same for the brief view: Before: https://screenshots.firefox.com/62t0wbESsXjcuKaO/pro.kohadev.org After: https://screenshots.firefox.com/oAnGeNsYW9s3qvTv/pro.kohadev.org
Pushed to master for 18.05, thanks to everybody involved!
Created attachment 71676 [details] [review] Bug 19641: (follow-up) Move patron templates to the footer Fix bad merge conflict with bug 12904
Created attachment 71677 [details] [review] Bug 19641: (follow-up) Update circulation.tt too Fix bad merge conflict with bug 18403
Last two patches pushed to master.
I have found a problem: circ/circulation.pl, search for a patron, I get: "ReferenceError: $ is not defined" circulation.tt includes circ-patron-search-results.inc which has JS inside (bug jQuery is not loaded yet) Please provide a follow-up here as soon as you can.
Something else: code has been moved to members-menu.js but this file is not used anywhere. The regression I found is: Edit a patron and open the form in the header [+] => It does not display
(In reply to Jonathan Druart from comment #27) > I have found a problem: > circ/circulation.pl, search for a patron, I get: "ReferenceError: $ is not > defined" Should have been fixed by Bug 20221, "Fix for JavaScript error during checkout patron search."