|
Lines 5-10
Link Here
|
| 5 |
<title>Koha › Tools › Inventory</title> |
5 |
<title>Koha › Tools › Inventory</title> |
| 6 |
[% INCLUDE 'doc-head-close.inc' %] |
6 |
[% INCLUDE 'doc-head-close.inc' %] |
| 7 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
7 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
|
|
8 |
<<<<<<< HEAD |
| 9 |
======= |
| 10 |
[% INCLUDE 'datatables.inc' %] |
| 11 |
[% INCLUDE 'calendar.inc' %] |
| 12 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
| 13 |
<script type="text/javascript"> |
| 14 |
//<![CDATA[ |
| 15 |
function checkForm() { |
| 16 |
if ( $('#uploadbarcodes').val() ) { |
| 17 |
if ( !( |
| 18 |
$('#branchloop').val() || |
| 19 |
$('#locationloop').val() || |
| 20 |
$('#minlocation').val() || |
| 21 |
$('#maxlocation').val() || |
| 22 |
$('#statuses input:checked').length |
| 23 |
) ) { |
| 24 |
return confirm( |
| 25 |
_("You have not selected any catalog filters and are about to compare a file of barcodes to your entire catalog.") + "\n\n" + |
| 26 |
_("For large catalogs this can result in unexpected behavior") + "\n\n" + |
| 27 |
_("Are you sure you want to do this?") |
| 28 |
); |
| 29 |
} |
| 30 |
} |
| 31 |
|
| 32 |
return true; |
| 33 |
} |
| 34 |
|
| 35 |
$(document).ready(function(){ |
| 36 |
inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, { |
| 37 |
'sPaginationType': 'full_numbers', |
| 38 |
[% IF compareinv2barcd %] |
| 39 |
// sort on callnumber |
| 40 |
"aaSorting": [[ 1, "asc" ]], |
| 41 |
[% ELSE %] |
| 42 |
// first column contains checkboxes |
| 43 |
"aoColumnDefs": [ |
| 44 |
{ "bSortable": false, "bSearchable": false, "aTargets": [ 0 ] }, |
| 45 |
], |
| 46 |
// 3rd column is callnumber |
| 47 |
"aaSorting": [[ 2, "asc" ]], |
| 48 |
[% END %] |
| 49 |
'fnDrawCallback': function() { |
| 50 |
//bind the click handler script to the newly created elements held in the table |
| 51 |
$('.openWin').bind('click',function(e){ |
| 52 |
e.preventDefault(); |
| 53 |
openWindow(this.href,'marcview',800,600); |
| 54 |
}); |
| 55 |
} |
| 56 |
} )); |
| 57 |
|
| 58 |
|
| 59 |
$("#continuewithoutmarkingbutton").click(function(){ |
| 60 |
inventorydt.fnPageChange( 'next' ); |
| 61 |
return false; |
| 62 |
}); |
| 63 |
|
| 64 |
$("#markseenandcontinuebutton").click(function(){ |
| 65 |
var param = ''; |
| 66 |
$("input:checked").each(function() { |
| 67 |
param += "|" + $(this).attr('name'); |
| 68 |
}); |
| 69 |
$.post('/cgi-bin/koha/tools/ajax-inventory.pl', { seen: param }); |
| 70 |
inventorydt.fnPageChange( 'next' ); |
| 71 |
return false; |
| 72 |
}); |
| 73 |
|
| 74 |
$("#markseenandquit").click(function(){ |
| 75 |
var param = ''; |
| 76 |
$("input:checked").each(function() { |
| 77 |
param += "|" + $(this).attr('name'); |
| 78 |
}); |
| 79 |
$.ajax({ |
| 80 |
type: 'POST', |
| 81 |
url: '/cgi-bin/koha/tools/ajax-inventory.pl', |
| 82 |
data: { seen: param}, |
| 83 |
async: false |
| 84 |
}); |
| 85 |
document.location.href = '/cgi-bin/koha/tools/inventory.pl'; |
| 86 |
return false; |
| 87 |
}); |
| 88 |
|
| 89 |
|
| 90 |
$(".checkall").click(function(){ |
| 91 |
$(".checkboxed").checkCheckboxes(); |
| 92 |
return false; |
| 93 |
}); |
| 94 |
$(".clearall").click(function(){ |
| 95 |
$(".checkboxed").unCheckCheckboxes(); |
| 96 |
return false; |
| 97 |
}); |
| 98 |
$("#inventory_form").on("submit",function(){ |
| 99 |
return checkForm(); |
| 100 |
}); |
| 101 |
|
| 102 |
// #uploadbarcodes and #compareinv2barcd determine the behavior of |
| 103 |
// the controls within the barcode fieldset and the optional filters |
| 104 |
$("#uploadbarcodes").change(function() { |
| 105 |
if( $("#uploadbarcodes").val() ) { |
| 106 |
$("#setdate").prop('disabled',false); |
| 107 |
$("#compareinv2barcd").prop('disabled',false); |
| 108 |
$("#compareinv2barcd").attr('checked',true); // default |
| 109 |
$("#dont_checkin").prop('disabled',false); |
| 110 |
if( $("#compareinv2barcd").attr('checked') ) { |
| 111 |
$("fieldset#optionalfilters").show(); |
| 112 |
$("#ignoreissued").attr('checked',true); // default |
| 113 |
} else { |
| 114 |
$("#ignoreissued").attr('checked',false); |
| 115 |
$("fieldset#optionalfilters").hide(); |
| 116 |
} |
| 117 |
} else { |
| 118 |
$("#setdate").prop('disabled',true); |
| 119 |
$("#compareinv2barcd").prop('disabled',true); |
| 120 |
$("#compareinv2barcd").attr('checked',false); |
| 121 |
$("#dont_checkin").prop('disabled',true); |
| 122 |
$("#dont_checkin").attr('checked',false); |
| 123 |
$("fieldset#optionalfilters").show(); |
| 124 |
} |
| 125 |
}); |
| 126 |
$("#compareinv2barcd").click(function() { |
| 127 |
if( $("#compareinv2barcd").attr('checked') ) { |
| 128 |
$("fieldset#optionalfilters").show(); |
| 129 |
$("#ignoreissued").attr('checked',true); // default |
| 130 |
} else { |
| 131 |
$("#ignoreissued").attr('checked',false); |
| 132 |
$("fieldset#optionalfilters").hide(); |
| 133 |
} |
| 134 |
}); |
| 135 |
}); |
| 136 |
//]]> |
| 137 |
</script> |
| 138 |
>>>>>>> Bug 19584: Check compare barcodes box when uploading barcodes |
| 8 |
</head> |
139 |
</head> |
| 9 |
|
140 |
|
| 10 |
<body id="tools_inventory" class="tools"> |
141 |
<body id="tools_inventory" class="tools"> |
|
Lines 347-357
Link Here
|
| 347 |
if( $("#uploadbarcodes").val() ) { |
478 |
if( $("#uploadbarcodes").val() ) { |
| 348 |
$("#setdate").prop('disabled',false); |
479 |
$("#setdate").prop('disabled',false); |
| 349 |
$("#compareinv2barcd").prop('disabled',false); |
480 |
$("#compareinv2barcd").prop('disabled',false); |
|
|
481 |
$("#compareinv2barcd").attr('checked',true); // default |
| 350 |
$("#dont_checkin").prop('disabled',false); |
482 |
$("#dont_checkin").prop('disabled',false); |
| 351 |
if( $("#compareinv2barcd").attr('checked') ) { |
483 |
if( $("#compareinv2barcd").attr('checked') ) { |
| 352 |
$("fieldset#optionalfilters").show(); |
484 |
$("fieldset#optionalfilters").show(); |
|
|
485 |
$("#ignoreissued").attr('checked',true); // default |
| 353 |
} else { |
486 |
} else { |
| 354 |
$("fieldset#optionalfilters").hide(); |
487 |
$("fieldset#optionalfilters").hide(); |
|
|
488 |
$("#ignoreissued").attr('checked',false); |
| 355 |
} |
489 |
} |
| 356 |
} else { |
490 |
} else { |
| 357 |
$("#setdate").prop('disabled',true); |
491 |
$("#setdate").prop('disabled',true); |
|
Lines 365-371
Link Here
|
| 365 |
$("#compareinv2barcd").click(function() { |
499 |
$("#compareinv2barcd").click(function() { |
| 366 |
if( $("#compareinv2barcd").attr('checked') ) { |
500 |
if( $("#compareinv2barcd").attr('checked') ) { |
| 367 |
$("fieldset#optionalfilters").show(); |
501 |
$("fieldset#optionalfilters").show(); |
|
|
502 |
$("#ignoreissued").attr('checked',true); // default |
| 368 |
} else { |
503 |
} else { |
|
|
504 |
$("#ignoreissued").attr('checked',false); |
| 369 |
$("fieldset#optionalfilters").hide(); |
505 |
$("fieldset#optionalfilters").hide(); |
| 370 |
} |
506 |
} |
| 371 |
}); |
507 |
}); |
| 372 |
- |
|
|