Bugzilla – Attachment 135502 Details for
Bug 26377
Clearly label parts of subscription-add.pl that relate to optional item records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26377: Simplify JS code
Bug-26377-Simplify-JS-code.patch (text/plain), 1.47 KB, created by
Jonathan Druart
on 2022-05-31 13:16:38 UTC
(
hide
)
Description:
Bug 26377: Simplify JS code
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-05-31 13:16:38 UTC
Size:
1.47 KB
patch
obsolete
>From b0415410c42a2ea4f5ef7fba5575013414d22f47 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 31 May 2022 11:18:08 +0200 >Subject: [PATCH] Bug 26377: Simplify JS code > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../intranet-tmpl/prog/js/subscription-add.js | 17 +++-------------- > 1 file changed, 3 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >index 2d7ce39c567..929a1f68d98 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >@@ -726,20 +726,9 @@ $(document).ready(function() { > }); > }); > >- $("#serialsadditems-yes").on("change", function(){ >- if( $(this).prop("checked") ){ >- $(".use_items").show(); >- } else { >- $(".use_items").hide().find("select").val(""); >- } >- }); >- >- $("#serialsadditems-no").on("change", function(){ >- if( $(this).prop("checked") ){ >- $(".use_items").hide().find("select").val(""); >- } else { >- $(".use_items").show(); >- } >+ $("input[name='serialsadditems']").on("change", function(){ >+ const display = $(this).val() == "1" ? "block" : "none"; >+ $(".use_items").css('display', display).find("select").val("") > }); > > }); >-- >2.25.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 26377
:
134968
|
135355
|
135455
|
135479
|
135480
|
135491
|
135492
|
135500
|
135501
| 135502