Bugzilla – Attachment 53663 Details for
Bug 16967
Remove the use of "onclick" from serial frequency and numbering management
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16967 - Remove the use of "onclick" from serial frequency and numbering management
Bug-16967---Remove-the-use-of-onclick-from-serial-.patch (text/plain), 5.28 KB, created by
Owen Leonard
on 2016-07-22 18:58:27 UTC
(
hide
)
Description:
Bug 16967 - Remove the use of "onclick" from serial frequency and numbering management
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-07-22 18:58:27 UTC
Size:
5.28 KB
patch
obsolete
>From be67f625af7890060730efe77fb1180123a2d4c2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 22 Jul 2016 14:48:36 -0400 >Subject: [PATCH] Bug 16967 - Remove the use of "onclick" from serial frequency > and numbering management >Content-Type: text/plain; charset="utf-8" > >This patch removes instance of "onclick" from the templates for serial >frequency and numbering management. Events are now defined in the >JavaScript. > >To test, apply the patch and go to Serials -> Manage frequencies. > > - In the list of frequencies, click the "Delete" button for a frequency > which is in use by at least one subscription. In the confirmation > dialog, clicking the "Show subscriptions" link should display a list > of titles. > - Edit or create a frequency. > - To test that the form submission validation is still working > correctly, enter non-numeric data in the "issues per unit" field and > submit the form. This should trigger an error. > >In Serials -> Manage numbering patterns: > > - In the list of numbering patterns, click the "Delete" button for a > pattern which is in use by at least one subscription. In the > confirmation dialog, clicking the "Show subscriptions" link should > display a list of titles. > - Edit or create a numbering pattern. > - Confirm that the "Test pattern" button works correctly. >--- > .../prog/en/modules/serials/subscription-frequencies.tt | 15 +++++++++------ > .../en/modules/serials/subscription-numberpatterns.tt | 11 +++++++++-- > 2 files changed, 18 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-frequencies.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-frequencies.tt >index 93631d2..4fc936b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-frequencies.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-frequencies.tt >@@ -44,10 +44,6 @@ function check_form() { > return false; > } > >-function show_blocking_subs() { >- $("#blocking_subs").show(); >-} >- > $(document).ready(function() { > $("#issuesperunit").change(function() { > var value = $(this).val(); >@@ -64,6 +60,13 @@ $(document).ready(function() { > $(".delete_frequency").on("click",function(){ > return confirmDelete(); > }); >+ $("#add_frequency_form").on("submit",function(){ >+ return check_form(); >+ }); >+ $("#show_blocking_subs").on("click",function(e){ >+ e.preventDefault(); >+ $("#blocking_subs").show(); >+ }); > }); > //]]> > </script> >@@ -99,7 +102,7 @@ $(document).ready(function() { > [% ELSE %] > <h1>Edit frequency: [% description %]</h1> > [% END %] >- <form action="/cgi-bin/koha/serials/subscription-frequencies.pl" method="post" onsubmit="return check_form();"> >+ <form action="/cgi-bin/koha/serials/subscription-frequencies.pl" id="add_frequency_form" method="post"> > [% IF (modify) %] > <input type="hidden" name="id" value="[% id %]" /> > <input type="hidden" name="op" value="savemod" /> >@@ -168,7 +171,7 @@ $(document).ready(function() { > This frequency is still used by [% subscriptions.size %] > subscription(s). Do you still want to delete it? > </p> >- <p><a href="#" onclick="show_blocking_subs(); return false;">Show subscriptions</a></p> >+ <p><a href="#" id="show_blocking_subs">Show subscriptions</a></p> > <ul id="blocking_subs" style="display:none"> > [% FOREACH sub IN subscriptions %] > <li style="list-style-type:none"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt >index 098cae1..9d6d267 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt >@@ -66,6 +66,13 @@ $(document).ready(function(){ > $(".delete_pattern").on("click",function(){ > return confirmDelete(); > }); >+ $("#show_blocking_subs").on("click",function(e){ >+ e.preventDefault(); >+ $("#blocking_subs").show(); >+ }); >+ $("#test_pattern").on("click",function(){ >+ testPattern(); >+ }); > }); > //]]> > </script> >@@ -284,7 +291,7 @@ $(document).ready(function(){ > </tbody> > </table> > <fieldset class="action"> >- <input type="button" value="Test pattern" onclick="testPattern();" /> >+ <input type="button" id="test_pattern" value="Test pattern" /> > </fieldset> > <div id="predictionpattern"></div> > </fieldset> >@@ -298,7 +305,7 @@ $(document).ready(function(){ > This pattern is still used by [% subscriptions.size %] > subscription(s). Do you still want to delete it? > </p> >- <p><a href="#" onclick="show_blocking_subs(); return false;">Show subscriptions</a></p> >+ <p><a href="#" id="show_blocking_subs">Show subscriptions</a></p> > <ul id="blocking_subs" style="display:none"> > [% FOREACH sub IN subscriptions %] > <li style="list-style-type:none"> >-- >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 16967
:
53663
|
55199
|
55511