From 6ebee15524a5e0fcb18335453064a82f20154339 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 20 Jul 2016 11:37:06 -0400 Subject: [PATCH] Bug 16962 - Remove the use of "onclick" from serial collection and serial edit templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch removes the use of event attributes like "onclick" from the serial collection and serial edit templates. Events are now defined in JavaScript. Also changed: Converted "create routing list," "edit routing list," and "Renew" links to Bootstrap buttons. The "select all" and "clear all" links have Font Awesome icons added. To test, apply the patch and go to Serials - Locate or create a subscription for which an item record is NOT created when receiving. - On the serial collection page for this subscription, test that the "Multi receiving" button works correctly. - For any subscription, test that the "Generate next" button works correctly. - In each tab, test that the "select all" and "clear all" links work correctly. - On a subscription which has expired, test that the "Renew" button works correctly. - On the serial collection page, select multiple issues and click the "Edit serials" button. - Testing with a subscription for which an item record is NOT created when receiving: - Changing the status to "Arrived" or "Claimed" should change the "Expected on" date to today's date. Selecting any other status should leave the "expected on" date as it was or return it to its original value. - Test that the "Multi receiving" button works correctly. - Testing with a subscription for which an item record IS created when receiving: - Changing the status of an issue should work as above but should also trigger the appearance of the item add form when the status is "Arrived" or "Claimed," and hide the form otherwise. - Cliking the "Item" link at the top of the item add form should hide it. - Clicking the "Add item" link under any issue should display the item add form. - In the item add form, test that repeatable fields are correctly duplicated when you click the "clone" button. - On the "Supplemental issue" line, changing the status to "Arrived" should work as described above. Changing the status on this line to "Claimed" should only change the "Expected on" date. - Adding regular and supplemental issues should work correctly. Signed-off-by: Frédéric Demians Works as described. Signed-off-by: Jonathan Druart --- .../prog/en/modules/serials/serials-collection.tt | 62 ++++++++++----- .../prog/en/modules/serials/serials-edit.tt | 91 ++++++++++++++++++---- 2 files changed, 119 insertions(+), 34 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt index 9a79eca..868cf8b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -6,7 +6,6 @@ [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'datatables.inc' %] - [% INCLUDE 'calendar.inc' %] - @@ -137,13 +197,13 @@ $(document).ready(function() { [% IF ( serialslis.editdisable ) %] - [% ELSE %] - [% IF ( serialslis.serialsadditems ) %] - - [% END %] + [% IF ( serialslis.serialsadditems ) %] + + [% END %] [% END %] [% IF ( serialslis.status1 ) %] @@ -214,10 +274,9 @@ $(document).ready(function() { [% IF ( serialslis.serialsadditems ) %] - - Click to add item + Add item