]> git.koha-community.org Git - koha.git/commit
Bug 23229: Only load ILL table JS when needed
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Fri, 28 Jun 2019 09:24:32 +0000 (10:24 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 9 Aug 2019 12:15:52 +0000 (14:15 +0200)
commit5ab8a4c13ed843b540274f4856fdf3e83202bc03
tree5ec130968d8606e6b4b8a8cd80a88f372a5d2e43
parent936f1450b802a6d00e6bf681eb60f3844ff865d0
Bug 23229: Only load ILL table JS when needed

This patch prevents the JS associated with the ILL table from loading
unless we're actually displaying the table. This has the knock on effect
of not causing the "get all ILL requests" API request to fire when
loading any ILL page.

Test plan:

- Go to "ILL requests" page
- TEST: Observe that the table loads all ILL requests
- Go to the "New ILL request" page for any installed backend
- TEST: Check the browser dev tools "Network" panel, observe that the
/api/v1/illrequests?embed=metadata,patron,capabilities,library,status_alias,comments,requested_partners
request is not made.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f79da166ae7f910648266b98d89f19f4307d10ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt