Bugzilla – Attachment 71694 Details for
Bug 20221
Fix for JavaScript error during checkout patron search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20221 - Fix for JavaScript error during checkout patron search
Bug-20221---Fix-for-JavaScript-error-during-checko.patch (text/plain), 4.59 KB, created by
Owen Leonard
on 2018-02-15 19:55:30 UTC
(
hide
)
Description:
Bug 20221 - Fix for JavaScript error during checkout patron search
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-02-15 19:55:30 UTC
Size:
4.59 KB
patch
obsolete
>From 28d4005a1d9245b9255a9918526976e26cbfa072 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 15 Feb 2018 19:43:39 +0000 >Subject: [PATCH] Bug 20221 - Fix for JavaScript error during checkout patron > search > >This patch fixes a bug caused by the changes in Bug 19641. JavaScript >embedded in circ-patron-search-results.inc executes before jQuery is >loaded. > >This patch adds a separate javascript file which can be included both in >circulation.tt and request.tt since both use the same include. > >To test, apply the patch and submit a patron name in the check out form. >On the page of search results, clicking a table row should work the same >as clicking the patron name link. > >Perform the same test during the hold process: Locate and place a hold >on a title. In the patron search form, submit a patron name and test the >behavior of the search results screen. >--- > .../prog/en/includes/circ-patron-search-results.inc | 12 ------------ > koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 1 + > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 1 + > .../intranet-tmpl/prog/js/circ-patron-search-results.js | 11 +++++++++++ > 4 files changed, 13 insertions(+), 12 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >index 29e72a2..8d8fcc6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >@@ -1,16 +1,4 @@ > [% USE KohaDates %] >-<script type="text/javascript"> >- $(document).ready(function() { >- $(".clickable").click(function() { >- window.document.location = $(this).data('url'); >- }); >- var table = $("#table_borrowers").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aaSorting": [ 0, "asc" ], >- "sDom": "t", >- "iDisplayLength": -1 >- })); >- }); >-</script> > <legend>Patron selection</legend> > <table id="table_borrowers" class="table_borrowers"> > <thead> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 92489bf..3068d57 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -983,6 +983,7 @@ No patron matched <span class="ex">[% message | html %]</span> > <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation_[% KOHA_VERSION %].js"></script> > <script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts_[% KOHA_VERSION %].js"></script> > <script type="text/javascript" src="[% interface %]/[% theme %]/js/holds_[% KOHA_VERSION %].js"></script> >+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/circ-patron-search-results_[% KOHA_VERSION %].js"></script> > <script type="text/javascript"> > /* Set some variable needed in circulation.js */ > var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning."); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 7b1c873..1cd3618 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -13,6 +13,7 @@ > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" /> > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'calendar.inc' %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/circ-patron-search-results_[% KOHA_VERSION %].js"></script> > <script type="text/javascript"> > // <![CDATA[ > var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?"); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js b/koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js >new file mode 100644 >index 0000000..20798f3 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/js/circ-patron-search-results.js >@@ -0,0 +1,11 @@ >+/* global dataTablesDefaults */ >+$(document).ready(function() { >+ $(".clickable").click(function() { >+ window.document.location = $(this).data('url'); >+ }); >+ var table = $("#table_borrowers").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aaSorting": [ 0, "asc" ], >+ "sDom": "t", >+ "iDisplayLength": -1 >+ })); >+}); >\ No newline at end of file >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20221
: 71694