Bugzilla – Attachment 69739 Details for
Bug 19584
Inventory: Trivial interface improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19584: Check compare barcodes box when uploading barcodes
Bug-19584-Check-compare-barcodes-box-when-uploadin.patch (text/plain), 7.69 KB, created by
Marcel de Rooy
on 2017-12-12 15:14:14 UTC
(
hide
)
Description:
Bug 19584: Check compare barcodes box when uploading barcodes
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-12-12 15:14:14 UTC
Size:
7.69 KB
patch
obsolete
>From 4bab7307a4be8024bd3c12afbfa408cf57c58836 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 7 Nov 2017 15:29:56 +0100 >Subject: [PATCH] Bug 19584: Check compare barcodes box when uploading barcodes >Content-Type: text/plain; charset=utf-8 > >This patch makes two trivial changes in the inventory interface: > >[1] If you have uploaded a barcode file, the compare barcodes checkbox is >automatically checked. In most cases this will be the option the user wants. >The compare will report missed items on the shelf. >[2] If the compare barcodes checkbox is checked, the Skip items on loan- >checkbox is automatically checked. This again is often desirable. If you >compare, you normally are not interested in seeing items reported missing >while they are checked out. > >Test plan: >[1] Upload a barcode file on inventory. Is the compare checked? >[2] Toggle compare. Does 'skip items on loan' change accordingly? > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/tools/inventory.tt | 136 +++++++++++++++++++++ > 1 file changed, 136 insertions(+) > >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 4b09243..3996535 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -5,6 +5,137 @@ > <title>Koha › Tools › Inventory</title> > [% INCLUDE 'doc-head-close.inc' %] > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> >+<<<<<<< HEAD >+======= >+[% INCLUDE 'datatables.inc' %] >+[% INCLUDE 'calendar.inc' %] >+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> >+<script type="text/javascript"> >+//<![CDATA[ >+function checkForm() { >+ if ( $('#uploadbarcodes').val() ) { >+ if ( !( >+ $('#branchloop').val() || >+ $('#locationloop').val() || >+ $('#minlocation').val() || >+ $('#maxlocation').val() || >+ $('#statuses input:checked').length >+ ) ) { >+ return confirm( >+ _("You have not selected any catalog filters and are about to compare a file of barcodes to your entire catalog.") + "\n\n" + >+ _("For large catalogs this can result in unexpected behavior") + "\n\n" + >+ _("Are you sure you want to do this?") >+ ); >+ } >+ } >+ >+ return true; >+} >+ >+$(document).ready(function(){ >+ inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, { >+ 'sPaginationType': 'full_numbers', >+ [% IF compareinv2barcd %] >+ // sort on callnumber >+ "aaSorting": [[ 1, "asc" ]], >+ [% ELSE %] >+ // first column contains checkboxes >+ "aoColumnDefs": [ >+ { "bSortable": false, "bSearchable": false, "aTargets": [ 0 ] }, >+ ], >+ // 3rd column is callnumber >+ "aaSorting": [[ 2, "asc" ]], >+ [% END %] >+ 'fnDrawCallback': function() { >+ //bind the click handler script to the newly created elements held in the table >+ $('.openWin').bind('click',function(e){ >+ e.preventDefault(); >+ openWindow(this.href,'marcview',800,600); >+ }); >+ } >+ } )); >+ >+ >+ $("#continuewithoutmarkingbutton").click(function(){ >+ inventorydt.fnPageChange( 'next' ); >+ return false; >+ }); >+ >+ $("#markseenandcontinuebutton").click(function(){ >+ var param = ''; >+ $("input:checked").each(function() { >+ param += "|" + $(this).attr('name'); >+ }); >+ $.post('/cgi-bin/koha/tools/ajax-inventory.pl', { seen: param }); >+ inventorydt.fnPageChange( 'next' ); >+ return false; >+ }); >+ >+ $("#markseenandquit").click(function(){ >+ var param = ''; >+ $("input:checked").each(function() { >+ param += "|" + $(this).attr('name'); >+ }); >+ $.ajax({ >+ type: 'POST', >+ url: '/cgi-bin/koha/tools/ajax-inventory.pl', >+ data: { seen: param}, >+ async: false >+ }); >+ document.location.href = '/cgi-bin/koha/tools/inventory.pl'; >+ return false; >+ }); >+ >+ >+ $(".checkall").click(function(){ >+ $(".checkboxed").checkCheckboxes(); >+ return false; >+ }); >+ $(".clearall").click(function(){ >+ $(".checkboxed").unCheckCheckboxes(); >+ return false; >+ }); >+ $("#inventory_form").on("submit",function(){ >+ return checkForm(); >+ }); >+ >+ // #uploadbarcodes and #compareinv2barcd determine the behavior of >+ // the controls within the barcode fieldset and the optional filters >+ $("#uploadbarcodes").change(function() { >+ if( $("#uploadbarcodes").val() ) { >+ $("#setdate").prop('disabled',false); >+ $("#compareinv2barcd").prop('disabled',false); >+ $("#compareinv2barcd").attr('checked',true); // default >+ $("#dont_checkin").prop('disabled',false); >+ if( $("#compareinv2barcd").attr('checked') ) { >+ $("fieldset#optionalfilters").show(); >+ $("#ignoreissued").attr('checked',true); // default >+ } else { >+ $("#ignoreissued").attr('checked',false); >+ $("fieldset#optionalfilters").hide(); >+ } >+ } else { >+ $("#setdate").prop('disabled',true); >+ $("#compareinv2barcd").prop('disabled',true); >+ $("#compareinv2barcd").attr('checked',false); >+ $("#dont_checkin").prop('disabled',true); >+ $("#dont_checkin").attr('checked',false); >+ $("fieldset#optionalfilters").show(); >+ } >+ }); >+ $("#compareinv2barcd").click(function() { >+ if( $("#compareinv2barcd").attr('checked') ) { >+ $("fieldset#optionalfilters").show(); >+ $("#ignoreissued").attr('checked',true); // default >+ } else { >+ $("#ignoreissued").attr('checked',false); >+ $("fieldset#optionalfilters").hide(); >+ } >+ }); >+}); >+//]]> >+</script> >+>>>>>>> Bug 19584: Check compare barcodes box when uploading barcodes > </head> > > <body id="tools_inventory" class="tools"> >@@ -347,11 +478,14 @@ > if( $("#uploadbarcodes").val() ) { > $("#setdate").prop('disabled',false); > $("#compareinv2barcd").prop('disabled',false); >+ $("#compareinv2barcd").attr('checked',true); // default > $("#dont_checkin").prop('disabled',false); > if( $("#compareinv2barcd").attr('checked') ) { > $("fieldset#optionalfilters").show(); >+ $("#ignoreissued").attr('checked',true); // default > } else { > $("fieldset#optionalfilters").hide(); >+ $("#ignoreissued").attr('checked',false); > } > } else { > $("#setdate").prop('disabled',true); >@@ -365,7 +499,9 @@ > $("#compareinv2barcd").click(function() { > if( $("#compareinv2barcd").attr('checked') ) { > $("fieldset#optionalfilters").show(); >+ $("#ignoreissued").attr('checked',true); // default > } else { >+ $("#ignoreissued").attr('checked',false); > $("fieldset#optionalfilters").hide(); > } > }); >-- >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 19584
:
68997
|
69017
|
69018
|
69739
|
70531
|
71656
|
71657
|
73255
|
73256