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 label creator templates.
Created attachment 69418 [details] [review] Bug 19709 - Move template JavaScript to the footer: Labels This patch modifies the staff client label creator templates so that JavaScript is included in the footer instead of the header. To test, apply the patch and test the JavaScript-driven features of each modified template: All button controls, DataTables functionality, form validation, etc. - Creating and managing layouts - Creating and managing batches - Creating and managing templates - Creating and managing printer profiles - Creating quick spine labels
Cannot apply when the process reaches bug 19607 (one of the dependencies) Applying: Bug 19607: Move admin templates JavaScript to the footer: Basic parameters Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt M koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt Failed to merge in the changes.
When creating/managing batches I had the following issues: - clicking 'add items' without entering any barcodes opens an empty frame - When exporting items or a batch, the 'cancel' link in the first frame doesn't work - After exporting, the 'done' button doesn't work The other parts seemed to be ok!
Created attachment 70432 [details] [review] Bug 19709 - Move template JavaScript to the footer: Labels This patch modifies the staff client label creator templates so that JavaScript is included in the footer instead of the header. To test, apply the patch and test the JavaScript-driven features of each modified template: All button controls, DataTables functionality, form validation, etc. - Creating and managing layouts - Creating and managing batches - Creating and managing templates - Creating and managing printer profiles - Creating quick spine labels Edit: Fixed footer include error causing blank popup
(In reply to Claire Gravely from comment #3) > - clicking 'add items' without entering any barcodes opens an empty frame My updated patch fixes this. > - When exporting items or a batch, the 'cancel' link in the first frame > doesn't work > - After exporting, the 'done' button doesn't work I can't reproduce these problems. Can you please try again and let me know if it's still happening?
(In reply to Owen Leonard from comment #5) > (In reply to Claire Gravely from comment #3) > > - clicking 'add items' without entering any barcodes opens an empty frame > > My updated patch fixes this. This is now working > > > - When exporting items or a batch, the 'cancel' link in the first frame > > doesn't work > > - After exporting, the 'done' button doesn't work > > I can't reproduce these problems. Can you please try again and let me know > if it's still happening? yep. I still have these issues. These are my steps - From 'Manage' I go to 'Label Batches' - select one of the batches and click 'Export selected' - Click the Cancel link in the frame ... and nothing happens. - Clicking 'Export' on the same page takes me to the options to download the Batch. - The 'Done' button in this frame does nothing. Whether I have downloaded something or not. It can be closed using the 'Close' link in the top right corner. Both the 'Cancel' link and 'Done' button work on Master branch.
I'm going to put this back to "needs signoff" in hopes that getting some more testers might shed some light on why it works fine for me but not Claire.
Created attachment 71557 [details] [review] Bug 19709 - Move template JavaScript to the footer: Labels This patch modifies the staff client label creator templates so that JavaScript is included in the footer instead of the header. To test, apply the patch and test the JavaScript-driven features of each modified template: All button controls, DataTables functionality, form validation, etc. - Creating and managing layouts - Creating and managing batches - Creating and managing templates - Creating and managing printer profiles - Creating quick spine labels Edit: Fixed footer include error causing blank popup
Created attachment 72439 [details] [review] Bug 19709 - Move template JavaScript to the footer: Labels This patch modifies the staff client label creator templates so that JavaScript is included in the footer instead of the header. To test, apply the patch and test the JavaScript-driven features of each modified template: All button controls, DataTables functionality, form validation, etc. - Creating and managing layouts - Creating and managing batches - Creating and managing templates - Creating and managing printer profiles - Creating quick spine labels Edit: Fixed footer include error causing blank popup
Created attachment 72625 [details] [review] Bug 19709 - Move template JavaScript to the footer: Labels This patch modifies the staff client label creator templates so that JavaScript is included in the footer instead of the header. To test, apply the patch and test the JavaScript-driven features of each modified template: All button controls, DataTables functionality, form validation, etc. - Creating and managing layouts - Creating and managing batches - Creating and managing templates - Creating and managing printer profiles - Creating quick spine labels Edit: Fixed footer include error causing blank popup Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Created attachment 72701 [details] [review] Bug 19709 (follow-up) Add KOHA_VERSION variables to js includes This follow-up adds the new [%i KOHA_VERSION %] variable to some <script> paths which were previously missing it. To test, apply the patch and view each affected page. The page's corresponding menu item in the left-hand sidebar should be highlighted, indicating that the tool-menu JS file is loading correctly. - Tools -> Label creator - Tools -> Label creator -> Manage -> Label batches - Tools -> Label creator -> Manage -> Label batches -> Export batch - Tools -> Label creator -> Manage -> Layouts - Tools -> Label creator -> Manage -> Label templates - Tools -> Label creator -> Manage -> Printer profiles - Tools -> Quick spine label creator
I reproduce the same problems with same steps. As Claire said : "- From 'Manage' I go to 'Label Batches' - select one of the batches and click 'Export selected' - Click the Cancel link in the frame ... and nothing happens. - Clicking 'Export' on the same page takes me to the options to download the Batch. - The 'Done' button in this frame does nothing. Whether I have downloaded something or not. It can be closed using the 'Close' link in the top right corner. "
Created attachment 73021 [details] [review] Bug 19709 (follow-up) Add missing Greybox library files This patch adds the Greybox assets to the label print template so that Greybox-related JS functions will work correctly. To test, apply the patch and go to Tools -> Label creator -> Manage -> Label batches. - Select a batch and click 'Export selected' - In the modal window, click the 'Cancel' link. It should close the window. - Click 'Export selected' again. - Click 'Export' - Click 'Done.' The window should close.
Same result the 'Cancel' link do nothing. Am I missing something ? I use a Sandbox with unimarc. My test : I created a new batch with only one item. Then I test following the test plan.
Created attachment 75155 [details] [review] Bug 19709: Move template JavaScript to the footer: Labels This patch modifies the staff client label creator templates so that JavaScript is included in the footer instead of the header. To test, apply the patch and test the JavaScript-driven features of each modified template: All button controls, DataTables functionality, form validation, etc. This patch also modifies the templates to use the Bootstrap grid instead of YUI, and removes obsolete "text/javascript" attributes from <script> tags and "text/css" attributes from <style> tags in the modified templates. To test, apply the patch and test the following interactions: - Creating and managing layouts - Creating and managing batches - Creating and managing templates - Creating and managing printer profiles - Creating quick spine labels
Created attachment 75253 [details] [review] Bug 19709: Move template JavaScript to the footer: Labels This patch modifies the staff client label creator templates so that JavaScript is included in the footer instead of the header. To test, apply the patch and test the JavaScript-driven features of each modified template: All button controls, DataTables functionality, form validation, etc. This patch also modifies the templates to use the Bootstrap grid instead of YUI, and removes obsolete "text/javascript" attributes from <script> tags and "text/css" attributes from <style> tags in the modified templates. To test, apply the patch and test the following interactions: - Creating and managing layouts - Creating and managing batches - Creating and managing templates - Creating and managing printer profiles - Creating quick spine labels Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
*** Bug 19959 has been marked as a duplicate of this bug. ***
Created attachment 76163 [details] [review] Bug 19709: Move template JavaScript to the footer: Labels This patch modifies the staff client label creator templates so that JavaScript is included in the footer instead of the header. To test, apply the patch and test the JavaScript-driven features of each modified template: All button controls, DataTables functionality, form validation, etc. This patch also modifies the templates to use the Bootstrap grid instead of YUI, and removes obsolete "text/javascript" attributes from <script> tags and "text/css" attributes from <style> tags in the modified templates. To test, apply the patch and test the following interactions: - Creating and managing layouts - Creating and managing batches - Creating and managing templates - Creating and managing printer profiles - Creating quick spine labels Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Awesome work all! Pushed to master for 18.11
Enhancement, not backporting to 18.05.x series.