Bug 19778 - Move template JavaScript to the footer: Serials, part 4
Summary: Move template JavaScript to the footer: Serials, part 4
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Josef Moravec
URL:
Keywords:
Depends on:
Blocks: 17858 22409
  Show dependency treegraph
 
Reported: 2017-12-07 19:35 UTC by Owen Leonard
Modified: 2019-02-25 16:34 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19778: Move template JavaScript to the footer: Serials, part 4 (53.55 KB, patch)
2017-12-08 17:07 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19778: Move template JavaScript to the footer: Serials, part 4 (53.10 KB, patch)
2017-12-08 19:59 UTC, Dominic Pichette
Details | Diff | Splinter Review
Bug 19778: Move template JavaScript to the footer: Serials, part 4 (53.16 KB, patch)
2017-12-14 09:03 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2017-12-07 19:35:50 UTC
+++ This bug was initially created as a clone of Bug #19777 +++

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 serials templates.
Comment 1 Owen Leonard 2017-12-08 17:07:29 UTC
Created attachment 69651 [details] [review]
Bug 19778: Move template JavaScript to the footer: Serials, part 4

This patch modifies more and more staff client serials templates so
that JavaScript is included in the footer instead of the header.

This patch adds a new JavaScript include, showpredictionpattern.js,
which is used by subscription-add.tt and subscription-numberpatterns.tt.
it also adds subscription-add.js, moving most of the JS embedded in
subscription-add.tt into an external file.

To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.

 - Serials -> New subscription
   - Date pickers
   - Popup search windows for vendors and bibliographic
     records
   - Next / Previous buttons
   - Form validation
   - Prediction pattern operations

   Test with new subscriptions, editing existing subscriptions, and
   duplicating subscriptions.

 - Serials -> Manage Numbering Patterns
   - Datatable
   - Delete confirmation
   -> Edit
      - Datepicker, test pattern
 - Serials -> Manage frequencies
   - Delete confirmation
   -> Edit
      - Form validation
 - Serials -> Subscription details -> Planning tab
   -> Edit history
      -> Datepicker
 - Serials -> Subscription details -> Renew
   - Datepicker
Comment 2 Dominic Pichette 2017-12-08 19:59:30 UTC
Created attachment 69663 [details] [review]
Bug 19778: Move template JavaScript to the footer: Serials, part 4

This patch modifies more and more staff client serials templates so
that JavaScript is included in the footer instead of the header.

This patch adds a new JavaScript include, showpredictionpattern.js,
which is used by subscription-add.tt and subscription-numberpatterns.tt.
it also adds subscription-add.js, moving most of the JS embedded in
subscription-add.tt into an external file.

To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.

 - Serials -> New subscription
   - Date pickers
   - Popup search windows for vendors and bibliographic
     records
   - Next / Previous buttons
   - Form validation
   - Prediction pattern operations

   Test with new subscriptions, editing existing subscriptions, and
   duplicating subscriptions.

 - Serials -> Manage Numbering Patterns
   - Datatable
   - Delete confirmation
   -> Edit
      - Datepicker, test pattern
 - Serials -> Manage frequencies
   - Delete confirmation
   -> Edit
      - Form validation
 - Serials -> Subscription details -> Planning tab
   -> Edit history
      -> Datepicker
 - Serials -> Subscription details -> Renew
   - Datepicker

Signed-off-by: Dominic Pichette <dominic@inlibro.com>
Comment 3 Josef Moravec 2017-12-14 09:03:47 UTC
Created attachment 69792 [details] [review]
Bug 19778: Move template JavaScript to the footer: Serials, part 4

This patch modifies more and more staff client serials templates so
that JavaScript is included in the footer instead of the header.

This patch adds a new JavaScript include, showpredictionpattern.js,
which is used by subscription-add.tt and subscription-numberpatterns.tt.
it also adds subscription-add.js, moving most of the JS embedded in
subscription-add.tt into an external file.

To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.

 - Serials -> New subscription
   - Date pickers
   - Popup search windows for vendors and bibliographic
     records
   - Next / Previous buttons
   - Form validation
   - Prediction pattern operations

   Test with new subscriptions, editing existing subscriptions, and
   duplicating subscriptions.

 - Serials -> Manage Numbering Patterns
   - Datatable
   - Delete confirmation
   -> Edit
      - Datepicker, test pattern
 - Serials -> Manage frequencies
   - Delete confirmation
   -> Edit
      - Form validation
 - Serials -> Subscription details -> Planning tab
   -> Edit history
      -> Datepicker
 - Serials -> Subscription details -> Renew
   - Datepicker

Signed-off-by: Dominic Pichette <dominic@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Jonathan Druart 2017-12-14 20:17:49 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 5 Nick Clemens 2017-12-20 11:49:26 UTC
Awesome work all! Enhancement, not backporting for 17.11