Bug 17893 - Move JavaScript to the footer on staff client catalog pages
Summary: Move JavaScript to the footer on staff client catalog pages
Status: Pushed to Master
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 17418 17870
Blocks: 17858
  Show dependency treegraph
 
Reported: 2017-01-12 16:43 UTC by Owen Leonard
Modified: 2017-09-07 18:09 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 17893 - Move JavaScript to the footer on staff client catalog pages (85.58 KB, patch)
2017-06-23 18:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 17893 - Move JavaScript to the footer on staff client catalog pages (85.63 KB, patch)
2017-06-27 14:36 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 17893 - Move JavaScript to the footer on staff client catalog pages (85.79 KB, patch)
2017-09-07 16:53 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 17893 - Move JavaScript to the footer on staff client catalog pages (85.94 KB, patch)
2017-09-07 18:08 UTC, Jonathan Druart
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-01-12 16:43:51 UTC
This patch will move JavaScript to the footer on a number of pages in the catalog module of the staff client:

basket/basket.tt
catalogue/ISBDdetail.tt
catalogue/MARCdetail.tt
catalogue/advsearch.tt
catalogue/detail.tt
catalogue/imageviewer.tt
catalogue/issuehistory.tt
catalogue/itemsearch.tt
catalogue/labeledMARCdetail.tt
catalogue/moredetail.tt
catalogue/results.tt
catalogue/search-history.tt

In the process I will be consolidating JS from several of those templates into one separate JavaScript file. Other modifications will be required in order for JavaScript to be able to be called from catalog-related include files. Since include files are parsed before jQuery is loaded in the footer, jQuery-specific code will have to be adapted or moved.
Comment 1 Owen Leonard 2017-06-23 18:19:08 UTC
Created attachment 64603 [details] [review]
Bug 17893 - Move JavaScript to the footer on staff client catalog pages

This patch modifies multiple catalog-related pages in order to move
embedded JavaScript to the footer.

The JavaScript previously embedded in cat-toolbar.inc is moved to a
separate file (catalog.js).

To test, apply the patch and test JavaScript-driven interactions on all
modified pages, including JS which isn't page-specific (menus, help,
etc). The functionality of the catalog toolbar should be tested on each
page.

- Bibliographic detail pages (standard, MARC, labeled MARC, ISBD).
- Advanced search page
- Local cover image viewer
- Item search page
- Item detail page
- Search history page
- Checkout history page

https://bugs.koha-community.org/show_bug.cgi?id=17839
Comment 2 Lee Jamison 2017-06-27 14:36:32 UTC
Created attachment 64677 [details] [review]
Bug 17893 - Move JavaScript to the footer on staff client catalog pages

This patch modifies multiple catalog-related pages in order to move
embedded JavaScript to the footer.

The JavaScript previously embedded in cat-toolbar.inc is moved to a
separate file (catalog.js).

To test, apply the patch and test JavaScript-driven interactions on all
modified pages, including JS which isn't page-specific (menus, help,
etc). The functionality of the catalog toolbar should be tested on each
page.

- Bibliographic detail pages (standard, MARC, labeled MARC, ISBD).
- Advanced search page
- Local cover image viewer
- Item search page
- Item detail page
- Search history page
- Checkout history page

https://bugs.koha-community.org/show_bug.cgi?id=17839

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 3 Owen Leonard 2017-09-07 16:53:06 UTC
Created attachment 66950 [details] [review]
Bug 17893 - Move JavaScript to the footer on staff client catalog pages

This patch modifies multiple catalog-related pages in order to move
embedded JavaScript to the footer.

The JavaScript previously embedded in cat-toolbar.inc is moved to a
separate file (catalog.js).

To test, apply the patch and test JavaScript-driven interactions on all
modified pages, including JS which isn't page-specific (menus, help,
etc). The functionality of the catalog toolbar should be tested on each
page.

- Bibliographic detail pages (standard, MARC, labeled MARC, ISBD).
- Advanced search page
- Local cover image viewer
- Item search page
- Item detail page
- Search history page
- Checkout history page

https://bugs.koha-community.org/show_bug.cgi?id=17839

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 4 Jonathan Druart 2017-09-07 18:08:50 UTC
Created attachment 66962 [details] [review]
Bug 17893 - Move JavaScript to the footer on staff client catalog pages

This patch modifies multiple catalog-related pages in order to move
embedded JavaScript to the footer.

The JavaScript previously embedded in cat-toolbar.inc is moved to a
separate file (catalog.js).

To test, apply the patch and test JavaScript-driven interactions on all
modified pages, including JS which isn't page-specific (menus, help,
etc). The functionality of the catalog toolbar should be tested on each
page.

- Bibliographic detail pages (standard, MARC, labeled MARC, ISBD).
- Advanced search page
- Local cover image viewer
- Item search page
- Item detail page
- Search history page
- Checkout history page

https://bugs.koha-community.org/show_bug.cgi?id=17839

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2017-09-07 18:09:15 UTC
Pushed to master for 17.11, thanks to everybody involved!