Bugzilla – Attachment 54244 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]
[SIGNED-OFF]Bug 17083: Remove more event attributes from tools templates
SIGNED-OFFBug-17083-Remove-more-event-attributes-f.patch (text/plain), 10.19 KB, created by
Héctor Eduardo Castro Avalos
on 2016-08-09 20:59:51 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 17083: Remove more event attributes from tools templates
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-08-09 20:59:51 UTC
Size:
10.19 KB
patch
obsolete
>From a05a7628f6849bae58876fcabe998eac36c58b65 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 5 Aug 2016 15:01:55 -0400 >Subject: [PATCH] [SIGNED-OFF]Bug 17083: Remove more event attributes from > tools templates > >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 >--- > .../prog/en/modules/labels/label-edit-layout.tt | 7 +++++-- > .../prog/en/modules/tools/cleanborrowers.tt | 21 ++++++++------------ > .../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(+), 20 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 9e68141..4ee88e8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt >@@ -5,7 +5,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. >@@ -19,7 +23,7 @@ > } > if((form.checkbox[1].checked)){ > if(!(form.date2.value)){ >- alert(_("please enter a date!")); >+ alert(_("Please enter a date!")); > return false; > } > } >@@ -29,15 +33,6 @@ > } > return true; > } >- >- /** >- * checkForm2(form) >- * This function check the form2 is correctly filled. >- */ >- function checkForm2(form) { >- return true; >- } >- // ]]> > </script> > > </head> >@@ -60,7 +55,7 @@ > [% IF step == 1 %] > <!-- step 1 START --> > <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> >@@ -129,7 +124,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 ef92067..18fcf36 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> >@@ -237,7 +240,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"> >@@ -305,7 +308,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 2af7a0e..4c6422f 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; >@@ -295,7 +304,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> >-- >1.7.10.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