Bugzilla – Attachment 53839 Details for
Bug 16968
Remove the use of "onclick" from serial patron and vendor search templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16968 - Remove the use of "onclick" from serial patron and vendor search templates
Bug-16968---Remove-the-use-of-onclick-from-serial-.patch (text/plain), 3.86 KB, created by
Jonathan Druart
on 2016-08-01 14:02:09 UTC
(
hide
)
Description:
Bug 16968 - Remove the use of "onclick" from serial patron and vendor search templates
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-01 14:02:09 UTC
Size:
3.86 KB
patch
obsolete
>From 62abaca0b34c115eb157c5f2373221b811dea2cf Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 22 Jul 2016 15:24:03 -0400 >Subject: [PATCH] Bug 16968 - Remove the use of "onclick" from serial patron > and vendor search templates > >This patch removes instances of "onclick" from the serials templates for >patron and vendor search. > >To test, go to Serials and click "New subscription." > >- In the new subscription form, click the "Search for a vendor" link. >- In the popup, search for a vendor. Confirm that clicking "Choose" > selects the correct vendor. > >- From the detail page of an existing subscription, click "Create > routing list." >- Search for a patron and test that the "Add" button in search results > works correctly to add patrons to the routing list. > >Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/en/modules/serials/acqui-search-result.tt | 16 +++++++++++++--- > .../prog/en/modules/serials/tables/members_results.tt | 2 +- > 2 files changed, 14 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt >index 94efaf7..a46e700 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt >@@ -1,7 +1,7 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Serials › Select vendor</title> > [% INCLUDE 'doc-head-close.inc' %] >-<script type="text/javascript" language="Javascript"> >+<script type="text/javascript"> > > function GetIt(aqbooksellerid,name) > { >@@ -9,6 +9,14 @@ function GetIt(aqbooksellerid,name) > opener.document.f.aqbooksellername.value = name; > window.close(); > } >+$(document).ready(function(){ >+ $(".select_vendor").on("click",function(e){ >+ e.preventDefault(); >+ var vendorname = $(this).data("vendorname"); >+ var vendorid = $(this).data("vendorid"); >+ GetIt( vendorid, vendorname ); >+ }); >+}); > </script> > </head> > <body id="ser_acqui-search-result" class="ser"> >@@ -29,13 +37,15 @@ function GetIt(aqbooksellerid,name) > [% FOREACH loop_supplier IN loop_suppliers %] > <tr> > <td>[% loop_supplier.name %]</td> >- <td><a href="#" onclick="GetIt([% loop_supplier.aqbooksellerid %],$(this).parent().prev().text())">Choose</a></td> >+ <td><a class="btn btn-mini select_vendor" href="#" data-vendorid="[% loop_supplier.aqbooksellerid %]" data-vendorname="[% loop_supplier.name |html%]">Choose</a></td> > </tr> > [% END %] > </table> > [% END %] > >- <p><a href="/cgi-bin/koha/serials/acqui-search.pl">Perform a new search</a> <a class="button" href="#" onclick="window.close()">Close</a></p> >+ <p><a href="/cgi-bin/koha/serials/acqui-search.pl">Perform a new search</a></p> >+ >+ <div id="closewindow"><a href="#" class="btn btn-default close">Cancel</a></div> > > </div> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt >index 75cf84c..6453d48 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/tables/members_results.tt >@@ -13,7 +13,7 @@ > "dt_branch": > "[% data.branchname |html %]", > "dt_action": >- "<a href=\"#\" onclick='add_user(\"[% data.borrowernumber %]\", \"[% data.firstname %] [% data.surname %]\"); return false;'>Add</a>" >+ "<a href=\"#\" class=\"add_user btn btn-mini\" data-borrowernumber=\"[% data.borrowernumber %]\" data-firstname=\"[% data.firstname %]\" data-surname=\"[% data.surname %]\">Add</a>" > }[% UNLESS loop.last %],[% END %] > [% END %] > ] >-- >2.8.1
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 16968
:
53684
|
53722
| 53839