Bug 19755

Summary: Move template JavaScript to the footer: Acquisitions, part 3
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, testopia
Version: masterKeywords: Academy
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 19753    
Bug Blocks: 17858, 19947, 20038    
Attachments: Bug 19755: Move template JavaScript to the footer: Acquisitions, part 3
Bug 19755: Move template JavaScript to the footer: Acquisitions, part 3
Bug 19755: Move template JavaScript to the footer: Acquisitions, part 3
Bug 19755: Move template JavaScript to the footer: Acquisitions, part 3

Description Owen Leonard 2017-12-05 17:56:58 UTC
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 even more of the acquisitions templates.
Comment 1 Owen Leonard 2017-12-06 15:29:36 UTC Comment hidden (obsolete)
Comment 2 Claire Gravely 2018-01-24 09:12:12 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2018-02-04 15:22:18 UTC
1) With the patch applied the paging (next page, previous page) when ordering from z39.50 are no longer working.

2) Transferring from the invoice page opens in a new tab, while transferring from the basket page opens a new window - shouldn't both behave the same? Outside of the scope of this bug, as it's the same with and without the patches. 

Owen, should we file a new bug?
Comment 4 Katrin Fischer 2018-02-07 20:58:17 UTC
Retesting...
Comment 5 Katrin Fischer 2018-02-07 21:02:52 UTC
(In reply to Katrin Fischer from comment #3)
> 1) With the patch applied the paging (next page, previous page) when
> ordering from z39.50 are no longer working.

Owen asked me to retest this and he was right - works like a charm now.

> 2) Transferring from the invoice page opens in a new tab, while transferring
> from the basket page opens a new window - shouldn't both behave the same?
> Outside of the scope of this bug, as it's the same with and without the
> patches. 
> 
> Owen, should we file a new bug?
Comment 6 Katrin Fischer 2018-02-07 21:03:20 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2018-02-12 14:36:56 UTC
Created attachment 71476 [details] [review]
Bug 19755: Move template JavaScript to the footer: Acquisitions, part 3

This patch modifies even more staff client acquisitions 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 the
modified templates: All button controls, DataTables functionality, tabs,
etc.

- Acquisitions -> Vendor -> Vendor details
  - Contracts datatable
  - Edit vendor
    - Add contacts, form validation
- Acquisitions -> Vendor -> Invoices -> Invoice -> "Go to receipt"
  - Datatables, MARC and Card previews
    - Transfer
      - Confirmation of transfer, window closes
- Acquisitions -> Vendor -> Receive shipments
  - Datatables, date pickers
- Acquisitions -> Available funds table -> Spent report
  - Datatables
- Acquisitions -> Vendor -> Uncertain prices
  - Datatables, form validation
- Acquisitions -> Vendor -> Basket -> Add to basket from external source
  - Select and clear all on search form
  - Search results
    - Datatables, MARC and Card previews, in-table pop-up controls
      (click any table cell)

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Owen Leonard 2018-02-12 14:37:29 UTC
Rebased.
Comment 9 Jonathan Druart 2018-02-15 16:39:25 UTC
Pushed to master for 18.05, thanks to everybody involved!