Bugzilla – Attachment 55750 Details for
Bug 17083
Remove more event attributes from tools templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 17083: Remove more event attributes from tools templates
PASSED-QA-Bug-17083-Remove-more-event-attributes-f.patch (text/plain), 10.61 KB, created by
Owen Leonard
on 2016-09-22 14:21:43 UTC
(
hide
)
Description:
[PASSED QA] Bug 17083: Remove more event attributes from tools templates
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-09-22 14:21:43 UTC
Size:
10.61 KB
patch
obsolete
>From 7f076077a75a4440d14fb3c6445bc9be5afaeea5 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 5 Aug 2016 15:01:55 -0400 >Subject: [PATCH] [PASSED QA] Bug 17083: Remove more event attributes from > tools templates >Content-Type: text/plain; charset="utf-8" > >This patch removes event attributes from several tool-related templates. >Events are defined instead in the JavaScript. > >To test, apply the patch and: > >- Go to Tools -> Label creator -> Manage -> Layouts and edit any layout. > - In the "Font" setting, choose any font which includes the word > "italic" or "oblique" in the name. Doing so should disable the > "Oblique title" checkbox. >- Go to Tools -> Batch patron deletion/anonymization. > - Submit the form without making any changes. You should be prompted > to select an action. >- Go to Tools -> Inventory. > - Select a batch of barcodes to upload. > - Submit the form without selecting any filters. This should trigger a > warning. > - Also changed: Added Font Awesome icons to the "Select all" and > "Clear all" links on the inventory results view. >- Go to Tools -> Notices and Slips. > - Click "New notice" > - Change the selection under "Koha module." The page should reload > with the correct available message body fields. For instance, > selecting "Holds" should make available reserves.* columns. >- Go to Tools -> Upload. > - In the search form, enter a search term and click the 'Search' > button. The form should submit. > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Works as advertised. Event attributes removed > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/labels/label-edit-layout.tt | 7 ++++-- > .../prog/en/modules/tools/cleanborrowers.tt | 28 +++++++--------------- > .../prog/en/modules/tools/inventory.tt | 9 ++++--- > .../intranet-tmpl/prog/en/modules/tools/letter.tt | 11 ++++++++- > .../intranet-tmpl/prog/en/modules/tools/upload.tt | 6 ++++- > 5 files changed, 34 insertions(+), 27 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt >index 017af77..402ea9e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt >@@ -10,11 +10,14 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › Label creator › Layouts › [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]New[% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] >- <script type="text/JavaScript" language="JavaScript"> >+ <script type="text/JavaScript"> > //<![CDATA[ > $(document).ready(function() { > $("input[name='layout_choice']").change( function() { layout_method() } ); > layout_method(); >+ $("#font").on("change",function(){ >+ checkOblique(); >+ }); > }); > function layout_method() { > if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) { >@@ -173,7 +176,7 @@ > </li> > <li> > <label for="font">Font: </label> >- <select name="font" id="font" onchange="checkOblique()"> >+ <select name="font" id="font"> > [% FOREACH font_type IN font_types %] > [% IF ( font_type.selected ) %] > <option value="[% font_type.type %]" selected="selected">[% font_type.name %]</option> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt >index dc78a06..e47a85e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt >@@ -6,7 +6,11 @@ > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] > <script type="text/javascript"> >-// <![CDATA[ >+ $(document).ready(function(){ >+ $("#delete_patrons_form").on("submit",function(){ >+ return checkForm( this ); >+ }); >+ }); > /** > * checkForm(form) > * This function check the form is correctly filled. >@@ -20,7 +24,7 @@ > } > if((form.checkbox[1].checked)){ > if(!(form.date2.value)){ >- alert(_("please enter a date!")); >+ alert(_("Please enter a date!")); > return false; > } > } >@@ -30,22 +34,6 @@ > } > return true; > } >- >- /** >- * checkForm2(form) >- * This function check the form2 is correctly filled. >- */ >- function checkForm2(form) { >- return true; >- } >- >- $(document).ready(function() { >- $('#selectlibrary').find("input:submit").hide(); >- $('#branch').change(function() { >- $('#selectlibrary').submit(); >- }); >- }); >- // ]]> > </script> > > </head> >@@ -90,7 +78,7 @@ > <p>This tool allows you to delete patrons and anonymize checkout history. For deleting patrons, any combination of limits can be used.</p> > </div> > <div id="step1"> >- <form name="f1" onsubmit="return checkForm(this);" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post"> >+ <form name="f1" id="delete_patrons_form" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post"> > <fieldset> > <legend>Delete patrons</legend> > <h3><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" /><label for="checkborrower"> Verify you want to delete patrons</label></h3> >@@ -167,7 +155,7 @@ > [% IF step == 2 %] > <!-- STEP 2 START --> > <div id="step2"> >- <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post" onsubmit="return checkForm2(this);"> >+ <form name="f2" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post"> > <fieldset> > <legend>Warnings</legend> > <ul> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >index f3ce125..b682d55 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -86,6 +86,9 @@ $(document).ready(function(){ > $(".checkboxed").unCheckCheckboxes(); > return false; > }); >+ $("#inventory_form").on("submit",function(){ >+ return checkForm(); >+ }); > }); > //]]> > </script> >@@ -120,7 +123,7 @@ $(document).ready(function(){ > [% END %] > [% UNLESS op %] > <div class="yui-g"> >- <form method="post" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data" onsubmit="return checkForm()"> >+ <form method="post" id="inventory_form" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data"> > <fieldset class="rows"> > <legend>Use a barcode file</legend> > <ol> >@@ -231,7 +234,7 @@ $(document).ready(function(){ > <input type="hidden" name="datelastseen" value="[% datelastseen %]" /> > > [% UNLESS compareinv2barcd %] >- <div><a href="#" class="checkall">[Select all]</a> <a href="#" class="clearall">[Clear all]</a></div> >+ <div><a href="#" class="checkall"><i class="fa fa-check"></i> Select all</a> <a href="#" class="clearall"><i class="fa fa-remove"></i> Clear all</a></div> > [% END %] > > <table id="inventoryt"> >@@ -299,7 +302,7 @@ $(document).ready(function(){ > </table> > <div class="spacer"></div> > [% UNLESS compareinv2barcd %] >- <div style="padding : .3em 0"><a href="#" class="checkall">[Select all]</a> <a href="#" class="clearall">[Clear all]</a></div> >+ <div style="padding : .3em 0"><a href="#" class="checkall"><i class="fa fa-check"></i> Select all</a> <a href="#" class="clearall"><i class="fa fa-remove"></i> Clear all</a></div> > <input type="submit" id="markseenandquit" value="Mark seen and quit" /> > <input type="submit" value="Mark seen and continue >>" id="markseenandcontinuebutton" /> > <input type="submit" value="Continue without marking >>" id="continuewithoutmarkingbutton" class="submit" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >index 3d1eb15..18094b4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >@@ -27,6 +27,15 @@ $(document).ready(function() { > }); > [% END %] > >+ $("#newmodule").on("change",function(){ >+ if( $("#branch").val() == ""){ >+ var branchcode = "*"; >+ } else { >+ var branchcode = $("#branch").val(); >+ } >+ window.location.href = "/cgi-bin/koha/tools/letter.pl?op=add_form&module=" + $(this).val() + "&branchcode=" + branchcode; >+ }); >+ > $("#submit_form").click( function(event) { > event.preventDefault(); > var at_least_one_exists = 0; >@@ -291,7 +300,7 @@ $(document).ready(function() { > <label for="module">Koha module:</label> > <input type="hidden" name="oldmodule" value="[% module %]" /> > [% IF adding %] >- <select name="module" id="module" onchange="javascript:window.location.href = unescape(window.location.pathname)+'?op=add_form&module='+this.value+'&content='+window.document.forms['Aform'].elements['content'].value;"> >+ <select name="module" id="newmodule"> > [% ELSE %] > <select name="module" id="module"> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >index cdb9dd7..524c9f2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt >@@ -138,7 +138,7 @@ > [% BLOCK newsearch %] > <form id="newsearch"> > <fieldset class="action"> >- <button onclick="SubmitMe('new'); return false;">New search</button> >+ <button id="new_search">New search</button> > </fieldset> > </form> > [% IF plugin %] >@@ -337,6 +337,10 @@ $(document).ready(function() { > var record_id = $(this).data("record-id"); > DeleteEntry( record_id ); > }); >+ $("#new_search").on("click",function(e){ >+ e.preventDefault(); >+ SubmitMe('new'); >+ }); > }); > //]]> > </script> >-- >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 17083
:
54199
|
54244
|
54435
| 55750